diff --git a/.changeset/free-steaks-wish.md b/.changeset/free-steaks-wish.md new file mode 100644 index 0000000..ba39c22 --- /dev/null +++ b/.changeset/free-steaks-wish.md @@ -0,0 +1,5 @@ +--- +"@godaddy/cli": patch +--- + +Add additional commerce API schemas diff --git a/biome.json b/biome.json index 5051962..6434dd8 100644 --- a/biome.json +++ b/biome.json @@ -6,6 +6,7 @@ "useIgnoreFile": false }, "files": { + "maxSize": 4194304, "ignoreUnknown": false, "ignore": [ "node_modules", diff --git a/package.json b/package.json index 5905b3e..06211b9 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "release": "pnpm build && pnpm publish --filter @godaddy/cli" }, "devDependencies": { + "@apidevtools/json-schema-ref-parser": "^15.3.5", "@biomejs/biome": "1.9.4", "@changesets/cli": "^2.29.8", "@types/node": "^22.14.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 34183b5..bc6786f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -78,6 +78,9 @@ importers: specifier: ^11.1.0 version: 11.1.0 devDependencies: + '@apidevtools/json-schema-ref-parser': + specifier: ^15.3.5 + version: 15.3.5(@types/json-schema@7.0.15) '@biomejs/biome': specifier: 1.9.4 version: 1.9.4 @@ -148,6 +151,12 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} + '@apidevtools/json-schema-ref-parser@15.3.5': + resolution: {integrity: sha512-orNOYXw3hYXxxisXMldjzjBzqqTLBPbwOtHg7ovBPvfBHDue1qM9YJENZ3W2BQuS+7z4ThogMbEzEsov57Itkg==} + engines: {node: '>=20'} + peerDependencies: + '@types/json-schema': ^7.0.15 + '@ark/schema@0.56.0': resolution: {integrity: sha512-ECg3hox/6Z/nLajxXqNhgPtNdHWC9zNsDyskwO28WinoFEnWow4IsERNz9AnXRhTZJnYIlAJ4uGn3nlLk65vZA==} @@ -1093,6 +1102,9 @@ packages: '@types/estree@1.0.8': resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} @@ -2371,6 +2383,11 @@ snapshots: '@jridgewell/gen-mapping': 0.3.13 '@jridgewell/trace-mapping': 0.3.31 + '@apidevtools/json-schema-ref-parser@15.3.5(@types/json-schema@7.0.15)': + dependencies: + '@types/json-schema': 7.0.15 + js-yaml: 4.1.1 + '@ark/schema@0.56.0': dependencies: '@ark/util': 0.56.0 @@ -3147,6 +3164,8 @@ snapshots: '@types/estree@1.0.8': {} + '@types/json-schema@7.0.15': {} + '@types/node@12.20.55': {} '@types/node@22.19.3': diff --git a/scripts/generate-api-catalog.ts b/scripts/generate-api-catalog.ts index 23403c5..7f901c4 100644 --- a/scripts/generate-api-catalog.ts +++ b/scripts/generate-api-catalog.ts @@ -26,19 +26,24 @@ */ import { execFileSync } from "node:child_process"; -import { lookup } from "node:dns/promises"; import * as fs from "node:fs"; -import { isIP } from "node:net"; import * as os from "node:os"; import * as path from "node:path"; import { fileURLToPath } from "node:url"; +import $RefParser from "@apidevtools/json-schema-ref-parser"; +import type { ParserOptions } from "@apidevtools/json-schema-ref-parser"; import { Kind, type TypeNode, parse as parseGraphql, print as printGraphql, } from "graphql"; -import { parse as parseYaml } from "yaml"; +import { parse as parseYamlStrict } from "yaml"; + +/** Parse YAML with lenient settings (duplicate keys: last wins). */ +function parseYaml(src: string): unknown { + return parseYamlStrict(src, { uniqueKeys: false }); +} // --------------------------------------------------------------------------- // Types @@ -196,6 +201,7 @@ interface SpecSource { repoName: string; specFile: string; specVersion: string; + graphqlOnly?: boolean; } interface DiscoveredSpecSources { @@ -217,321 +223,185 @@ const GITHUB_API_BASE = "https://api.github.com"; const GITHUB_REPOS_PAGE_SIZE = 100; const COMMERCE_SPEC_REPO_PATTERN = /^commerce\.[a-z0-9-]+-specification$/; const BOOTSTRAP_COMMERCE_REPOS = [ + "commerce.bulk-operations-specification", + "commerce.businesses-specification", "commerce.catalog-products-specification", - "commerce.orders-specification", - "commerce.stores-specification", + "commerce.channels-specification", + "commerce.chargebacks-specification", + "commerce.customer-profiles-specification", "commerce.fulfillments-specification", "commerce.metafields-specification", - "commerce.transactions-specification", - "commerce.businesses-specification", - "commerce.bulk-operations-specification", - "commerce.channels-specification", "commerce.onboarding-specification", + "commerce.orders-specification", + "commerce.payment-requests-specification", + "commerce.payments-specification", + "commerce.price-adjustments-specification", + "commerce.recommendations-specification", + "commerce.shipping-specification", + "commerce.stores-specification", + "commerce.subscriptions-specification", + "commerce.taxes-specification", + "commerce.transactions-specification", ]; const LEGACY_ALWAYS_INCLUDE_REPOS = ["location.addresses-specification"]; // --------------------------------------------------------------------------- -// External $ref resolution security controls -// --------------------------------------------------------------------------- - -const ALLOWED_REF_HOSTS = new Set(["schemas.api.godaddy.com"]); -const MAX_REF_REDIRECTS = 5; -const MAX_REF_BYTES = 1_000_000; // 1 MB -const REF_FETCH_TIMEOUT_MS = 10_000; - +// $ref resolution via json-schema-ref-parser // --------------------------------------------------------------------------- -// External $ref resolution -// --------------------------------------------------------------------------- - -const refCache = new Map>(); -const hostValidationCache = new Set(); - -function isPrivateOrReservedIp(address: string): boolean { - const version = isIP(address); - if (version === 4) { - const parts = address.split(".").map((part) => Number.parseInt(part, 10)); - if (parts.length !== 4 || parts.some((part) => Number.isNaN(part))) - return true; - const [a, b] = parts; - - if (a === 0 || a === 10 || a === 127) return true; - if (a === 100 && b >= 64 && b <= 127) return true; // RFC 6598 - if (a === 169 && b === 254) return true; // link-local - if (a === 172 && b >= 16 && b <= 31) return true; // private - if (a === 192 && b === 0) return true; - if (a === 192 && b === 168) return true; // private - if (a === 192 && b === 2) return true; // TEST-NET-1 - if (a === 198 && (b === 18 || b === 19)) return true; // benchmark - if (a === 198 && b === 51) return true; // TEST-NET-2 - if (a === 203 && b === 0) return true; // TEST-NET-3 - if (a >= 224) return true; // multicast + reserved - return false; - } - - if (version === 6) { - const lower = address.toLowerCase(); - if (lower === "::" || lower === "::1") return true; - if (lower.startsWith("fc") || lower.startsWith("fd")) return true; // ULA - if ( - lower.startsWith("fe8") || - lower.startsWith("fe9") || - lower.startsWith("fea") || - lower.startsWith("feb") - ) { - return true; // link-local - } - if (lower.startsWith("2001:db8")) return true; // documentation range - if (lower.startsWith("::ffff:")) { - const mapped = lower.slice("::ffff:".length); - if (isIP(mapped) === 4) { - return isPrivateOrReservedIp(mapped); - } - } - return false; - } - - return true; -} - -function validateRefUrl(urlString: string): URL { - const parsed = new URL(urlString); - - if (parsed.protocol !== "https:") { - throw new Error( - `Blocked external $ref '${urlString}': only https URLs are allowed`, - ); - } - - if (parsed.username || parsed.password) { - throw new Error( - `Blocked external $ref '${urlString}': credentialed URLs are not allowed`, - ); - } - - if (parsed.port && parsed.port !== "443") { - throw new Error( - `Blocked external $ref '${urlString}': non-default HTTPS ports are not allowed`, - ); - } - - if (!ALLOWED_REF_HOSTS.has(parsed.hostname)) { - throw new Error( - `Blocked external $ref '${urlString}': host '${parsed.hostname}' is not allowlisted`, - ); - } - - return parsed; -} - -async function validateResolvedHost(url: URL): Promise { - const host = url.hostname.toLowerCase(); - if (hostValidationCache.has(host)) return; - - const addresses = await lookup(host, { all: true, verbatim: true }); - if (addresses.length === 0) { - throw new Error( - `Blocked external $ref '${url}': DNS lookup returned no IPs`, - ); - } - - for (const record of addresses) { - if (isPrivateOrReservedIp(record.address)) { - throw new Error( - `Blocked external $ref '${url}': host resolves to private/reserved IP ${record.address}`, - ); - } - } - - hostValidationCache.add(host); -} - -async function readResponseTextWithLimit( - response: Response, - maxBytes: number, -): Promise { - if (!response.body) { - const text = await response.text(); - const size = Buffer.byteLength(text, "utf8"); - if (size > maxBytes) { - throw new Error( - `External $ref response exceeded ${maxBytes} bytes (${size} bytes)`, - ); - } - return text; - } - - const reader = response.body.getReader(); - const chunks: Uint8Array[] = []; - let total = 0; - - while (true) { - const { done, value } = await reader.read(); - if (done) break; - if (!value) continue; - - total += value.byteLength; - if (total > maxBytes) { - await reader.cancel(); - throw new Error( - `External $ref response exceeded ${maxBytes} bytes while streaming`, - ); - } - - chunks.push(value); - } - - const merged = new Uint8Array(total); - let offset = 0; - for (const chunk of chunks) { - merged.set(chunk, offset); - offset += chunk.byteLength; - } - - return new TextDecoder().decode(merged); -} - -async function fetchWithValidation( - initialUrl: string, -): Promise<{ response: Response; finalUrl: string }> { - let currentUrl = initialUrl; - - for (let redirects = 0; redirects <= MAX_REF_REDIRECTS; redirects++) { - const parsed = validateRefUrl(currentUrl); - await validateResolvedHost(parsed); - - const controller = new AbortController(); - const timeout = setTimeout(() => controller.abort(), REF_FETCH_TIMEOUT_MS); - let response: Response; - - try { - response = await fetch(currentUrl, { - redirect: "manual", - signal: controller.signal, - }); - } catch (error) { - if (error instanceof Error && error.name === "AbortError") { - throw new Error( - `Timed out fetching external $ref '${currentUrl}' after ${REF_FETCH_TIMEOUT_MS}ms`, - ); - } - throw error; - } finally { - clearTimeout(timeout); - } - if (response.status >= 300 && response.status < 400) { - const location = response.headers.get("location"); - if (!location) { - throw new Error( - `External $ref redirect from '${currentUrl}' missing Location header`, - ); - } - if (redirects === MAX_REF_REDIRECTS) { - throw new Error( - `Too many redirects while fetching external $ref '${initialUrl}'`, - ); - } - currentUrl = new URL(location, currentUrl).toString(); - continue; - } - - const finalUrl = response.url || currentUrl; - const finalParsed = validateRefUrl(finalUrl); - await validateResolvedHost(finalParsed); +/** + * Path to the cloned common-types-specification repo, set during discovery. + * Used by the custom resolver to map https://schemas.api.godaddy.com URLs + * to local files. + */ +let commonTypesLocalDir: string | null = null; - return { response, finalUrl }; +/** + * Dereference an OpenAPI spec file, resolving all $ref pointers in-place. + * Uses json-schema-ref-parser with a custom resolver that maps + * https://schemas.api.godaddy.com/common-types/... to local files. + */ +/** + * Given a file path containing "common-types", try to find the actual file + * in the local common-types clone. Handles multiple path patterns used across + * repos: + * - ./common-types/v1/schemas/yaml/foo.yaml (full nested path) + * - ./common-types/foo.json (flat shortcut) + */ +function resolveCommonTypesFile(filePath: string): string | null { + if (!commonTypesLocalDir) return null; + + const basename = path.basename(filePath); + const ext = path.extname(basename).toLowerCase(); + + // Try the path as-is relative to common-types root + // e.g. common-types/v1/schemas/yaml/foo.yaml + const idx = filePath.indexOf("common-types"); + if (idx >= 0) { + const relPath = filePath.slice(idx + "common-types/".length); + const direct = path.join(commonTypesLocalDir, relPath); + if (fs.existsSync(direct)) return direct; } - throw new Error( - `Unexpected redirect handling failure for external $ref '${initialUrl}'`, + // Flat ref pattern: ./common-types/foo.json → search in v1/schemas/{json,yaml}/ + const subdir = ext === ".json" ? "json" : "yaml"; + const nested = path.join( + commonTypesLocalDir, + "v1", + "schemas", + subdir, + basename, ); -} - -async function fetchExternalRef(url: string): Promise> { - const cached = refCache.get(url); - if (cached) return cached; + if (fs.existsSync(nested)) return nested; + + // Try opposite format + const altSubdir = subdir === "json" ? "yaml" : "json"; + const altExt = altSubdir === "json" ? ".json" : ".yaml"; + const altBasename = basename.replace(ext, altExt); + const alt = path.join( + commonTypesLocalDir, + "v1", + "schemas", + altSubdir, + altBasename, + ); + if (fs.existsSync(alt)) return alt; - console.log(` Fetching external $ref: ${url}`); - const { response, finalUrl } = await fetchWithValidation(url); - if (!response.ok) { - throw new Error( - `Failed to fetch external $ref '${finalUrl}': ${response.status}`, - ); - } + return null; +} - const contentLength = response.headers.get("content-length"); - if (contentLength) { - const size = Number.parseInt(contentLength, 10); - if (Number.isFinite(size) && size > MAX_REF_BYTES) { - throw new Error( - `External $ref '${finalUrl}' is too large (${size} bytes > ${MAX_REF_BYTES})`, - ); - } - } +async function dereferenceSpec(specFilePath: string): Promise { + const options: ParserOptions = { + continueOnError: true, + dereference: { + circular: "ignore", + }, + resolve: { + // Disable built-in HTTP resolver to prevent outbound fetches. + // All refs must resolve locally or via our custom resolvers below. + http: false as unknown as ParserOptions["resolve"], + // Custom resolver: map schemas.api.godaddy.com URLs to local files + godaddySchemas: { + order: 1, + canRead: (file: { url: string }) => { + try { + const hostname = new URL(file.url).hostname; + return hostname === "schemas.api.godaddy.com"; + } catch { + return false; + } + }, + read: (file: { url: string }) => { + if (!commonTypesLocalDir) { + throw new Error( + `Cannot resolve ${file.url}: common-types not cloned`, + ); + } + const urlPath = new URL(file.url).pathname; + const localPath = path.join( + commonTypesLocalDir, + urlPath.replace(/^\/common-types\//, "/"), + ); + if (!fs.existsSync(localPath)) { + throw new Error( + `Cannot resolve ${file.url}: not found at ${localPath}`, + ); + } + return fs.readFileSync(localPath, "utf-8"); + }, + }, + // Custom file resolver: intercept missing common-types paths + commonTypesFile: { + order: 200, // run after built-in file resolver (order 100) + canRead: (file: { url: string }) => { + return file.url.includes("common-types"); + }, + read: (file: { url: string }) => { + // Convert file:// URL to path + let filePath: string; + try { + filePath = fileURLToPath(file.url); + } catch { + filePath = file.url.replace(/^file:\/\//, ""); + } + // If the file exists on disk, read it normally + if (fs.existsSync(filePath)) { + return fs.readFileSync(filePath, "utf-8"); + } + // Otherwise try to resolve via common-types clone + const resolved = resolveCommonTypesFile(filePath); + if (resolved) { + return fs.readFileSync(resolved, "utf-8"); + } + throw new Error( + `Cannot resolve common-types ref: ${path.basename(filePath)}`, + ); + }, + }, + }, + }; - const text = await readResponseTextWithLimit(response, MAX_REF_BYTES); - let parsed: Record; - const finalPath = new URL(finalUrl).pathname.toLowerCase(); + // Use an instance so we can access the partially-resolved schema + // even when continueOnError throws after accumulating errors. + const parser = new $RefParser(); try { - if (finalPath.endsWith(".yaml") || finalPath.endsWith(".yml")) { - parsed = parseYaml(text) as Record; - } else { - parsed = JSON.parse(text) as Record; - } + await parser.dereference(specFilePath, options); } catch (error) { + // continueOnError accumulates errors then throws; the schema is still + // partially resolved on the instance. const message = error instanceof Error ? error.message : String(error); - throw new Error(`Failed to parse external $ref '${finalUrl}': ${message}`); - } - - // Strip JSON Schema meta-fields that add noise for agents - const { $id, $schema, ...rest } = parsed; - const cleaned = rest as Record; - - refCache.set(finalUrl, cleaned); - refCache.set(url, cleaned); - return cleaned; -} - -/** - * Resolve a potentially relative $ref URL against a base URL. - */ -function resolveRefUrl(ref: string, baseUrl?: string): string | null { - if (ref.startsWith("https://") || ref.startsWith("http://")) return ref; - if (ref.startsWith("#")) return null; // local JSON pointer — skip - if (!baseUrl) return null; - const base = baseUrl.substring(0, baseUrl.lastIndexOf("/") + 1); - return new URL(ref, base).toString(); -} - -/** - * Walk an object tree and resolve any { $ref: "..." } nodes by - * fetching the URL and inlining the result. - */ -async function resolveRefs(obj: unknown, parentUrl?: string): Promise { - if (obj === null || obj === undefined) return obj; - if (typeof obj !== "object") return obj; - - if (Array.isArray(obj)) { - return Promise.all(obj.map((item) => resolveRefs(item, parentUrl))); + console.error( + ` WARNING: $ref resolution had errors: ${message.slice(0, 200)}`, + ); } - const record = obj as Record; - - if (typeof record.$ref === "string") { - const resolvedUrl = resolveRefUrl(record.$ref, parentUrl); - if (resolvedUrl) { - const resolved = await fetchExternalRef(resolvedUrl); - const { $ref, ...siblings } = record; - const merged = { ...resolved, ...siblings }; - return resolveRefs(merged, resolvedUrl); - } + if (parser.schema) { + return parser.schema as unknown as OpenApiSpec; } - const result: Record = {}; - for (const [key, value] of Object.entries(record)) { - result[key] = await resolveRefs(value, parentUrl); - } - return result; + // Total failure — fall back to raw parse + const raw = fs.readFileSync(specFilePath, "utf-8"); + return parseOpenApiSpec(raw, specFilePath); } // --------------------------------------------------------------------------- @@ -718,7 +588,7 @@ function compareVersionArrays(a: number[], b: number[]): number { function findLatestSpecFile( repoDir: string, -): { version: string; specFile: string } | null { +): { version: string; specFile: string; graphqlOnly?: boolean } | null { const versionCandidates = fs .readdirSync(repoDir, { withFileTypes: true }) .filter((entry) => entry.isDirectory()) @@ -733,17 +603,30 @@ function findLatestSpecFile( for (let index = versionCandidates.length - 1; index >= 0; index -= 1) { const version = versionCandidates[index].name; - const candidates = [ + // Prefer OpenAPI specs + const openApiCandidates = [ path.join(repoDir, version, "schemas", "openapi.yaml"), path.join(repoDir, version, "schemas", "openapi.yml"), path.join(repoDir, version, "schemas", "openapi.json"), ]; - for (const candidate of candidates) { + for (const candidate of openApiCandidates) { if (fs.existsSync(candidate)) { return { version, specFile: candidate }; } } + + // Fall back to standalone GraphQL schema + const graphqlCandidates = [ + path.join(repoDir, version, "schemas", "graphql", "schema.graphql"), + path.join(repoDir, version, "schemas", "schema.graphql"), + ]; + + for (const candidate of graphqlCandidates) { + if (fs.existsSync(candidate)) { + return { version, specFile: candidate, graphqlOnly: true }; + } + } } return null; @@ -855,6 +738,22 @@ async function discoverSpecSources(): Promise { const sources: SpecSource[] = []; const usedDomains = new Set(); + // Clone common-types-specification once; it is referenced as a submodule + // by most commerce spec repos at v*/schemas/common-types. + const commonTypesDir = path.join(cloneRoot, "__common-types"); + try { + cloneRepository( + `https://github.com/${GITHUB_ORG}/common-types-specification.git`, + commonTypesDir, + ); + commonTypesLocalDir = commonTypesDir; + } catch (error) { + const message = error instanceof Error ? error.message : String(error); + console.error( + `WARNING: failed to clone common-types-specification: ${message}`, + ); + } + for (const repo of selectedRepos) { const repoDir = path.join(cloneRoot, repo.name); const repoRef = repoRefOverrides.get(repo.name); @@ -902,6 +801,7 @@ async function discoverSpecSources(): Promise { repoName: repo.name, specFile: latestSpec.specFile, specVersion: latestSpec.version, + graphqlOnly: latestSpec.graphqlOnly, }); } @@ -1090,7 +990,37 @@ function loadGraphqlSchemaMetadata( } const schemaSource = fs.readFileSync(resolvedSchemaPath, "utf-8"); - const operations = parseGraphqlOperations(schemaSource); + + let operations: CatalogGraphqlOperation[]; + try { + operations = parseGraphqlOperations(schemaSource); + } catch (parseError) { + // GraphQL schemas in the wild sometimes contain syntax issues + // (e.g. consecutive block-string descriptions without a field). + // Try a best-effort repair: strip orphaned doc-comment blocks. + const repaired = schemaSource.replace( + /"""[^"]*"""\s*\n\s*"""/g, + (match) => { + // Keep only the last doc-comment block + const lastIdx = match.lastIndexOf('"""', match.length - 4); + const secondLastIdx = match.lastIndexOf('"""', lastIdx - 1); + return match.slice(secondLastIdx); + }, + ); + try { + operations = parseGraphqlOperations(repaired); + console.error( + `WARNING: repaired malformed GraphQL schema at ${resolvedSchemaPath}`, + ); + } catch { + console.error( + `WARNING: could not parse GraphQL schema at ${resolvedSchemaPath}: ${ + parseError instanceof Error ? parseError.message : String(parseError) + }`, + ); + operations = []; + } + } const metadata: CatalogGraphqlSchema = { schemaRef, @@ -1134,6 +1064,7 @@ function resolveParameter( spec: OpenApiSpec, parameter: OpenApiParameter | OpenApiReference, ): OpenApiParameter | null { + if (!parameter || typeof parameter !== "object") return null; if ("$ref" in parameter) { const resolved = resolveLocalRef(spec, parameter.$ref); if (!resolved) return null; @@ -1205,6 +1136,7 @@ function processOperation( const responses: CatalogEndpoint["responses"] = {}; if (operation.responses) { for (const [status, resp] of Object.entries(operation.responses)) { + if (!resp || typeof resp !== "object") continue; if ("$ref" in resp) { responses[status] = { description: `See ${(resp as { $ref: string }).$ref}`, @@ -1222,7 +1154,10 @@ function processOperation( const operationId = operation.operationId || - `${httpMethod}${pathStr.replace(/[^a-zA-Z0-9]/g, "_")}`; + `${httpMethod}_${pathStr + .replace(/[^a-zA-Z0-9]/g, "_") + .replace(/_+/g, "_") + .replace(/^_|_$/g, "")}`; let graphql: CatalogGraphqlSchema | undefined; const graphqlSchemaRef = operation["x-godaddy-graphql-schema"]; @@ -1303,10 +1238,33 @@ function repairMissingJsonCommas(raw: string): string { return lines.join("\n"); } +/** + * Repair YAML lines where a colon is missing the required trailing space, + * e.g. `operationId:disableWebScannerAlert` → `operationId: disableWebScannerAlert`. + */ +function repairMissingYamlColonSpace(raw: string): string { + // Only match horizontal whitespace (spaces/tabs) so we don't span lines + return raw.replace( + /^([ \t]+\w+):([^\s#])/gm, + (_, key: string, val: string) => `${key}: ${val}`, + ); +} + function parseOpenApiSpec(raw: string, specFile: string): OpenApiSpec { try { return parseYaml(raw) as OpenApiSpec; } catch (error) { + // Try YAML colon-space repair first (works for both .yaml and .json) + const yamlRepaired = repairMissingYamlColonSpace(raw); + if (yamlRepaired !== raw) { + try { + console.error(`WARNING: repaired missing colon-space in ${specFile}`); + return parseYaml(yamlRepaired) as OpenApiSpec; + } catch { + // fall through to JSON repair + } + } + const lowerPath = specFile.toLowerCase(); if (!lowerPath.endsWith(".json")) { throw error; @@ -1414,33 +1372,66 @@ async function main() { } try { - const raw = fs.readFileSync(source.specFile, "utf-8"); - const spec = parseOpenApiSpec(raw, source.specFile); - const catalog = processSpec(spec, source.domain, source.specFile); - - console.log( - ` Resolving external $refs for ${source.domain} (${source.repoName}/${source.specVersion})...`, - ); - const resolved = (await resolveRefs(catalog)) as CatalogDomain; + let catalog: CatalogDomain; + + if (source.graphqlOnly) { + // GraphQL-only source — synthesize a catalog from the schema + const gqlMeta = loadGraphqlSchemaMetadata( + source.specFile, + source.specFile, + ); + // Replace the absolute temp path with a clean relative ref + gqlMeta.schemaRef = "./schema.graphql"; + catalog = { + name: source.domain, + title: `${source.domain} GraphQL API`, + description: `GraphQL API with ${gqlMeta.operationCount} operations`, + version: source.specVersion.replace(/^v/, ""), + baseUrl: "", + endpoints: [ + { + operationId: "graphql", + method: "POST", + path: "/graphql", + summary: "GraphQL API", + description: `GraphQL endpoint with ${gqlMeta.operationCount} operations`, + responses: { + "200": { description: "GraphQL response" }, + }, + scopes: [], + graphql: gqlMeta, + }, + ], + }; + console.log( + ` ${source.domain}: GraphQL schema with ${gqlMeta.operationCount} operations (${source.repoName}/${source.specVersion})`, + ); + } else { + console.log( + ` Dereferencing ${source.domain} (${source.repoName}/${source.specVersion})...`, + ); + const spec = await dereferenceSpec(source.specFile); + catalog = processSpec(spec, source.domain, source.specFile); + } const filename = `${source.domain}.json`; activeDomainFiles.add(filename); fs.writeFileSync( path.join(OUTPUT_DIR, filename), - JSON.stringify(resolved, null, "\t"), + JSON.stringify(catalog, null, 2), "utf-8", ); manifest.domains[source.domain] = { file: filename, - title: resolved.title, - endpointCount: resolved.endpoints.length, + title: catalog.title, + endpointCount: catalog.endpoints.length, }; - totalEndpoints += resolved.endpoints.length; + totalEndpoints += catalog.endpoints.length; console.log( - ` ${source.domain}: ${resolved.endpoints.length} endpoints from ${spec.info.title} v${spec.info.version}`, + ` ${source.domain}: ${catalog.endpoints.length} endpoints from ${catalog.title} v${catalog.version}`, ); } catch (error) { const message = error instanceof Error ? error.message : String(error); @@ -1459,7 +1450,7 @@ async function main() { fs.writeFileSync( path.join(OUTPUT_DIR, "manifest.json"), - JSON.stringify(manifest, null, "\t"), + JSON.stringify(manifest, null, 2), "utf-8", ); diff --git a/src/cli/agent/truncation.ts b/src/cli/agent/truncation.ts index 0019c2a..d690d92 100644 --- a/src/cli/agent/truncation.ts +++ b/src/cli/agent/truncation.ts @@ -39,7 +39,7 @@ function slugify(commandId: string): string { return commandId.replace(/[^a-zA-Z0-9-_.]+/g, "-"); } -function writeFullOutput(commandId: string, payload: unknown): string { +export function writeFullOutput(commandId: string, payload: unknown): string { const dir = join(tmpdir(), "godaddy-cli"); fs.mkdirSync(dir, { recursive: true, mode: 0o700 }); try { diff --git a/src/cli/commands/api.ts b/src/cli/commands/api.ts index 761e3f9..62e1541 100644 --- a/src/cli/commands/api.ts +++ b/src/cli/commands/api.ts @@ -13,7 +13,7 @@ import { } from "../../core/api"; import { authLoginEffect, getTokenInfoEffect } from "../../core/auth"; import { AuthenticationError, ValidationError } from "../../effect/errors"; -import { protectPayload, truncateList } from "../agent/truncation"; +import { truncateList, writeFullOutput } from "../agent/truncation"; import type { NextAction } from "../agent/types"; import { type CatalogDomain, @@ -496,6 +496,176 @@ function summarizeGraphqlSchema(graphql: CatalogEndpoint["graphql"]) { }; } +// --------------------------------------------------------------------------- +// Schema summarization for agent-friendly output +// --------------------------------------------------------------------------- + +interface SchemaSummaryProperty { + name: string; + type: string; + required: boolean; + description?: string; + format?: string; + enum?: unknown[]; + items?: string; +} + +/** + * Summarize a JSON Schema into a compact representation suitable for LLM + * context windows. Shows top-level properties with types, required markers, + * and up to one level of nested object properties. + */ +function summarizeSchema( + schema: Record | undefined, +): SchemaSummaryProperty[] | undefined { + if (!schema) return undefined; + + const properties = schema.properties as + | Record> + | undefined; + if (!properties) { + if (schema.type || schema.enum) { + return [ + { + name: "(value)", + type: schemaTypeLabel(schema), + required: true, + }, + ]; + } + return undefined; + } + + const required = new Set( + Array.isArray(schema.required) ? (schema.required as string[]) : [], + ); + + return Object.entries(properties).map(([name, prop]) => { + const entry: SchemaSummaryProperty = { + name, + type: schemaTypeLabel(prop), + required: required.has(name), + }; + + if (typeof prop.description === "string" && prop.description.length > 0) { + entry.description = prop.description.slice(0, 120); + } + if (typeof prop.format === "string") { + entry.format = prop.format; + } + if (Array.isArray(prop.enum) && prop.enum.length <= 10) { + entry.enum = prop.enum; + } + if ( + prop.type === "array" && + typeof prop.items === "object" && + prop.items !== null + ) { + const items = prop.items as Record; + entry.items = schemaTypeLabel(items); + } + + return entry; + }); +} + +function schemaTypeLabel(schema: Record): string { + if (!schema) return "unknown"; + if (typeof schema.type === "string") { + if (schema.type === "array" && schema.items) { + const items = schema.items as Record; + return `array<${schemaTypeLabel(items)}>`; + } + if (schema.type === "object" && schema.properties) { + const props = Object.keys( + schema.properties as Record, + ).slice(0, 5); + const more = Object.keys(schema.properties as object).length; + const suffix = props.length < more ? ", ..." : ""; + return `object{${props.join(", ")}${suffix}}`; + } + return schema.format + ? `${schema.type}(${schema.format})` + : (schema.type as string); + } + if (Array.isArray(schema.enum)) { + const vals = (schema.enum as unknown[]).slice(0, 8); + const suffix = (schema.enum as unknown[]).length > 8 ? ", ..." : ""; + return `enum(${vals.join("|")}${suffix})`; + } + if (Array.isArray(schema.oneOf)) return "oneOf"; + if (Array.isArray(schema.anyOf)) return "anyOf"; + if (Array.isArray(schema.allOf)) return "allOf"; + if (schema.$ref) return `ref(${schema.$ref as string})`; + return "object"; +} + +function summarizeResponses( + responses: CatalogEndpoint["responses"] | undefined, +): + | Record + | undefined { + if (!responses) return undefined; + const result: Record< + string, + { description: string; schema?: SchemaSummaryProperty[] } + > = {}; + for (const [status, resp] of Object.entries(responses)) { + result[status] = { + description: resp.description || "", + schema: summarizeSchema( + resp.schema as Record | undefined, + ), + }; + } + return result; +} + +function summarizeRequestBody( + requestBody: CatalogEndpoint["requestBody"] | undefined, +): + | { + required: boolean; + contentType?: string; + description?: string; + schema?: SchemaSummaryProperty[]; + } + | undefined { + if (!requestBody) return undefined; + return { + required: requestBody.required, + contentType: requestBody.contentType, + description: requestBody.description, + schema: summarizeSchema( + requestBody.schema as Record | undefined, + ), + }; +} + +/** + * Returns true if the summarized schemas contain nested object/array types + * that the inline summary cannot fully represent. + */ +function hasComplexNestedTypes( + requestSchema: SchemaSummaryProperty[] | undefined, + responses: + | Record + | undefined, +): boolean { + const check = (props: SchemaSummaryProperty[] | undefined) => + props?.some( + (p) => p.type.startsWith("object{") || p.type.startsWith("array + ({ endpoint, method }) => Effect.gen(function* () { const writer = yield* EnvelopeWriter; const { catalogPathCandidates: pathCandidates } = parseEndpointInput(endpoint); + const methodFilter = Option.getOrUndefined(method)?.toUpperCase(); + // Try exact path lookup first let result: Option.Option<{ domain: CatalogDomain; @@ -627,10 +804,22 @@ const apiDescribe = Command.make( }> = Option.none(); for (const candidatePath of pathCandidates) { - const exactMatch = yield* findEndpointByAnyMethodEffect(candidatePath); - if (Option.isSome(exactMatch)) { - result = exactMatch; - break; + if (methodFilter) { + const exactMatch = yield* findEndpointByPathEffect( + methodFilter, + candidatePath, + ); + if (Option.isSome(exactMatch)) { + result = exactMatch; + break; + } + } else { + const exactMatch = + yield* findEndpointByAnyMethodEffect(candidatePath); + if (Option.isSome(exactMatch)) { + result = exactMatch; + break; + } } } @@ -682,7 +871,40 @@ const apiDescribe = Command.make( const { domain, endpoint: ep } = result.value; - const payload = protectPayload( + const summarizedRequest = summarizeRequestBody(ep.requestBody); + const summarizedResponses = summarizeResponses(ep.responses); + + // Only write the full schema file + hint when there are nested + // objects that the summary can't fully represent. + const hasNestedObjects = hasComplexNestedTypes( + summarizedRequest?.schema, + summarizedResponses, + ); + + let schemaDetail: { note: string; file: string } | undefined; + if (hasNestedObjects) { + const fullSchemaPath = writeFullOutput( + `api-describe-${ep.operationId}`, + { + domain: domain.name, + baseUrl: domain.baseUrl, + operationId: ep.operationId, + method: ep.method, + path: ep.path, + parameters: ep.parameters, + requestBody: ep.requestBody, + responses: ep.responses, + scopes: ep.scopes, + }, + ); + schemaDetail = { + note: "Inline schemas show top-level property names and types. Read the file below for full nested object definitions.", + file: fullSchemaPath, + }; + } + + yield* writer.emitSuccess( + "godaddy api describe", { domain: domain.name, baseUrl: domain.baseUrl, @@ -696,22 +918,11 @@ const apiDescribe = Command.make( summary: ep.summary, description: ep.description, parameters: ep.parameters, - requestBody: ep.requestBody, - responses: ep.responses, + requestBody: summarizedRequest, + responses: summarizedResponses, scopes: ep.scopes, graphql: summarizeGraphqlSchema(ep.graphql), - }, - `api-describe-${ep.operationId}`, - ); - - yield* writer.emitSuccess( - "godaddy api describe", - { - ...payload.value, - truncated: payload.metadata?.truncated ?? false, - total: payload.metadata?.total, - shown: payload.metadata?.shown, - full_output: payload.metadata?.full_output, + schema_detail: schemaDetail, }, describeNextActions(domain, ep), ); diff --git a/src/cli/schemas/api/bulk-operations.json b/src/cli/schemas/api/bulk-operations.json index 84abe94..fb3e457 100644 --- a/src/cli/schemas/api/bulk-operations.json +++ b/src/cli/schemas/api/bulk-operations.json @@ -6,7 +6,7 @@ "baseUrl": "https://api.godaddy.com/v1/commerce", "endpoints": [ { - "operationId": "get_stores__storeId__bulk_ingestions", + "operationId": "get_stores_storeId_bulk_ingestions", "method": "GET", "path": "/stores/{storeId}/bulk-ingestions", "summary": "Get bulk ingestions", @@ -17,7 +17,11 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -59,7 +63,197 @@ "type": "array", "description": "The bulk ingestions", "items": { - "$ref": "./models/Bulkingestion.yaml" + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-ingestion.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Ingestion", + "type": "object", + "description": "A bulk ingestion object", + "properties": { + "id": { + "description": "The unique identifier for the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE" + }, + "entityType": { + "type": "string", + "default": "PRODUCT", + "description": "The type of the entity, currently only accepts PRODUCT" + }, + "status": { + "type": "string", + "default": "IDLE", + "description": "The status of the bulk ingestion, currently accepts IDLE, PARSING, \nVALIDATING, EXECUTING, PARSING_COMPLETE, PARSING_FAILED, \nVALIDATION_COMPLETE, EXECUTION_COMPLETE, VALIDATION_FAILED, \nEXECUTION_FAILED, EXPIRED, CANCELED\n" + }, + "intent": { + "type": "string", + "default": "WRITE", + "description": "The intent of the bulk ingestion, currently accepts WRITE, \nPROCESS\n" + }, + "mappedAttributes": { + "type": "object", + "description": "The mapped attributes for the bulk ingestion", + "additionalProperties": { + "type": "object", + "properties": { + "pointer": { + "description": "The pointer for the mapped attribute in the data source. It specifies \nthe path to the attribute within the data structure, such as a JSON \nobject or a CSV file. \n", + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "separator": { + "type": "string", + "description": "The separator used to split a string value into multiple parts. This is useful when a single attribute contains multiple values separated by a specific character." + }, + "position": { + "type": "integer", + "description": "The position of the mapped attribute within a split string. This is used in conjunction with the separator to specify which part of the split string to map." + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "boolean" + } + ] + } + } + }, + "example": { + "name": { + "pointer": "product_name" + }, + "sku": { + "pointer": "product_sku" + }, + "price.value": { + "pointer": "price" + }, + "variantOptionMapping[0].value": { + "pointer": "Variant Name", + "separator": "/", + "position": 1 + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The attributes for the bulk ingestion" + }, + "totalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk ingestion" + }, + "lastRunTotalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk ingestion from last run" + }, + "parsedCount": { + "type": "integer", + "default": 0, + "description": "The parsed count of the bulk ingestion" + }, + "validatedCount": { + "type": "integer", + "default": 0, + "description": "The validated count of the bulk ingestion" + }, + "executedCount": { + "type": "integer", + "default": 0, + "description": "The executed count of the bulk ingestion" + }, + "errorCount": { + "type": "integer", + "default": 0, + "description": "The error count of the bulk ingestion" + }, + "createdAt": { + "description": "The creation date of the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "parsedAt": { + "description": "The parsed date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "validatedAt": { + "description": "The validated date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "executedAt": { + "description": "The executed date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } } }, "pageToken": { @@ -70,23 +264,463 @@ "type": "array", "description": "The links", "items": { - "$ref": "./common-types/v1/schemas/json/link-description.json" + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } } } }, "404": { - "description": "See #/components/responses/Error" + "description": "Get Bulk Ingestions Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "500": { - "description": "See #/components/responses/InternalServerError" + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, "scopes": [] }, { - "operationId": "post_stores__storeId__bulk_ingestions", + "operationId": "post_stores_storeId_bulk_ingestions", "method": "POST", "path": "/stores/{storeId}/bulk-ingestions", "summary": "Create bulk ingestion", @@ -97,7 +731,11 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } } ], @@ -127,28 +765,658 @@ "type": "object", "properties": { "bulkIngestion": { - "$ref": "./models/Bulkingestion.yaml" + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-ingestion.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Ingestion", + "type": "object", + "description": "A bulk ingestion object", + "properties": { + "id": { + "description": "The unique identifier for the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE" + }, + "entityType": { + "type": "string", + "default": "PRODUCT", + "description": "The type of the entity, currently only accepts PRODUCT" + }, + "status": { + "type": "string", + "default": "IDLE", + "description": "The status of the bulk ingestion, currently accepts IDLE, PARSING, \nVALIDATING, EXECUTING, PARSING_COMPLETE, PARSING_FAILED, \nVALIDATION_COMPLETE, EXECUTION_COMPLETE, VALIDATION_FAILED, \nEXECUTION_FAILED, EXPIRED, CANCELED\n" + }, + "intent": { + "type": "string", + "default": "WRITE", + "description": "The intent of the bulk ingestion, currently accepts WRITE, \nPROCESS\n" + }, + "mappedAttributes": { + "type": "object", + "description": "The mapped attributes for the bulk ingestion", + "additionalProperties": { + "type": "object", + "properties": { + "pointer": { + "description": "The pointer for the mapped attribute in the data source. It specifies \nthe path to the attribute within the data structure, such as a JSON \nobject or a CSV file. \n", + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "separator": { + "type": "string", + "description": "The separator used to split a string value into multiple parts. This is useful when a single attribute contains multiple values separated by a specific character." + }, + "position": { + "type": "integer", + "description": "The position of the mapped attribute within a split string. This is used in conjunction with the separator to specify which part of the split string to map." + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "boolean" + } + ] + } + } + }, + "example": { + "name": { + "pointer": "product_name" + }, + "sku": { + "pointer": "product_sku" + }, + "price.value": { + "pointer": "price" + }, + "variantOptionMapping[0].value": { + "pointer": "Variant Name", + "separator": "/", + "position": 1 + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The attributes for the bulk ingestion" + }, + "totalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk ingestion" + }, + "lastRunTotalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk ingestion from last run" + }, + "parsedCount": { + "type": "integer", + "default": 0, + "description": "The parsed count of the bulk ingestion" + }, + "validatedCount": { + "type": "integer", + "default": 0, + "description": "The validated count of the bulk ingestion" + }, + "executedCount": { + "type": "integer", + "default": 0, + "description": "The executed count of the bulk ingestion" + }, + "errorCount": { + "type": "integer", + "default": 0, + "description": "The error count of the bulk ingestion" + }, + "createdAt": { + "description": "The creation date of the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "parsedAt": { + "description": "The parsed date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "validatedAt": { + "description": "The validated date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "executedAt": { + "description": "The executed date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } }, "links": { "type": "array", "items": { - "$ref": "./common-types/v1/schemas/json/link-description.json" + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } } } }, "400": { - "description": "See #/components/responses/Error" + "description": "Post Bulk Ingestions Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "500": { - "description": "See #/components/responses/InternalServerError" + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, "scopes": [] }, { - "operationId": "get_stores__storeId__bulk_ingestions__bulkIngestionId_", + "operationId": "get_stores_storeId_bulk_ingestions_bulkIngestionId", "method": "GET", "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}", "summary": "Get bulk ingestion", @@ -159,7 +1427,11 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -168,7 +1440,11 @@ "required": true, "description": "The Bulk Ingestion ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } } ], @@ -176,20 +1452,608 @@ "200": { "description": "Get bulk ingestion", "schema": { - "$ref": "./models/Bulkingestion.yaml" + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-ingestion.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Ingestion", + "type": "object", + "description": "A bulk ingestion object", + "properties": { + "id": { + "description": "The unique identifier for the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE" + }, + "entityType": { + "type": "string", + "default": "PRODUCT", + "description": "The type of the entity, currently only accepts PRODUCT" + }, + "status": { + "type": "string", + "default": "IDLE", + "description": "The status of the bulk ingestion, currently accepts IDLE, PARSING, \nVALIDATING, EXECUTING, PARSING_COMPLETE, PARSING_FAILED, \nVALIDATION_COMPLETE, EXECUTION_COMPLETE, VALIDATION_FAILED, \nEXECUTION_FAILED, EXPIRED, CANCELED\n" + }, + "intent": { + "type": "string", + "default": "WRITE", + "description": "The intent of the bulk ingestion, currently accepts WRITE, \nPROCESS\n" + }, + "mappedAttributes": { + "type": "object", + "description": "The mapped attributes for the bulk ingestion", + "additionalProperties": { + "type": "object", + "properties": { + "pointer": { + "description": "The pointer for the mapped attribute in the data source. It specifies \nthe path to the attribute within the data structure, such as a JSON \nobject or a CSV file. \n", + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "separator": { + "type": "string", + "description": "The separator used to split a string value into multiple parts. This is useful when a single attribute contains multiple values separated by a specific character." + }, + "position": { + "type": "integer", + "description": "The position of the mapped attribute within a split string. This is used in conjunction with the separator to specify which part of the split string to map." + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "boolean" + } + ] + } + } + }, + "example": { + "name": { + "pointer": "product_name" + }, + "sku": { + "pointer": "product_sku" + }, + "price.value": { + "pointer": "price" + }, + "variantOptionMapping[0].value": { + "pointer": "Variant Name", + "separator": "/", + "position": 1 + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The attributes for the bulk ingestion" + }, + "totalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk ingestion" + }, + "lastRunTotalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk ingestion from last run" + }, + "parsedCount": { + "type": "integer", + "default": 0, + "description": "The parsed count of the bulk ingestion" + }, + "validatedCount": { + "type": "integer", + "default": 0, + "description": "The validated count of the bulk ingestion" + }, + "executedCount": { + "type": "integer", + "default": 0, + "description": "The executed count of the bulk ingestion" + }, + "errorCount": { + "type": "integer", + "default": 0, + "description": "The error count of the bulk ingestion" + }, + "createdAt": { + "description": "The creation date of the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "parsedAt": { + "description": "The parsed date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "validatedAt": { + "description": "The validated date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "executedAt": { + "description": "The executed date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } } }, "404": { - "description": "See #/components/responses/Error" + "description": "Get Bulk Ingestion Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "500": { - "description": "See #/components/responses/InternalServerError" + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, "scopes": [] }, { - "operationId": "patch_stores__storeId__bulk_ingestions__bulkIngestionId_", + "operationId": "patch_stores_storeId_bulk_ingestions_bulkIngestionId", "method": "PATCH", "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}", "summary": "Update bulk ingestion", @@ -200,7 +2064,11 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -209,7 +2077,11 @@ "required": true, "description": "The Bulk Ingestion ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } } ], @@ -240,7 +2112,64 @@ } }, "overrides": { - "$ref": "./models/BulkIngestionOverride.yaml" + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-ingestion-override.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Ingestion Override", + "type": "object", + "description": "A bulk ingestion override object", + "properties": { + "id": { + "description": "The unique identifier for the bulk ingestion override", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "bulkIngestionId": { + "description": "The unique identifier for the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "op": { + "type": "string", + "description": "The operation of the override patch, can be add, remove, \nor replace\n", + "default": "replace" + }, + "path": { + "type": "string", + "description": "The path of the override, consists of an index and an \nattribute name\n", + "example": "/0/name" + }, + "value": { + "type": "string", + "description": "The value of the override" + }, + "createdAt": { + "description": "The creation date of the override", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the override", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } } } } @@ -249,23 +2178,810 @@ "200": { "description": "Update bulk ingestion", "schema": { - "$ref": "./models/Bulkingestion.yaml" - } - }, - "400": { - "description": "See #/components/responses/Error" - }, - "404": { - "description": "See #/components/responses/Error" - }, - "500": { - "description": "See #/components/responses/InternalServerError" - } - }, + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-ingestion.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Ingestion", + "type": "object", + "description": "A bulk ingestion object", + "properties": { + "id": { + "description": "The unique identifier for the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE" + }, + "entityType": { + "type": "string", + "default": "PRODUCT", + "description": "The type of the entity, currently only accepts PRODUCT" + }, + "status": { + "type": "string", + "default": "IDLE", + "description": "The status of the bulk ingestion, currently accepts IDLE, PARSING, \nVALIDATING, EXECUTING, PARSING_COMPLETE, PARSING_FAILED, \nVALIDATION_COMPLETE, EXECUTION_COMPLETE, VALIDATION_FAILED, \nEXECUTION_FAILED, EXPIRED, CANCELED\n" + }, + "intent": { + "type": "string", + "default": "WRITE", + "description": "The intent of the bulk ingestion, currently accepts WRITE, \nPROCESS\n" + }, + "mappedAttributes": { + "type": "object", + "description": "The mapped attributes for the bulk ingestion", + "additionalProperties": { + "type": "object", + "properties": { + "pointer": { + "description": "The pointer for the mapped attribute in the data source. It specifies \nthe path to the attribute within the data structure, such as a JSON \nobject or a CSV file. \n", + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "separator": { + "type": "string", + "description": "The separator used to split a string value into multiple parts. This is useful when a single attribute contains multiple values separated by a specific character." + }, + "position": { + "type": "integer", + "description": "The position of the mapped attribute within a split string. This is used in conjunction with the separator to specify which part of the split string to map." + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "boolean" + } + ] + } + } + }, + "example": { + "name": { + "pointer": "product_name" + }, + "sku": { + "pointer": "product_sku" + }, + "price.value": { + "pointer": "price" + }, + "variantOptionMapping[0].value": { + "pointer": "Variant Name", + "separator": "/", + "position": 1 + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The attributes for the bulk ingestion" + }, + "totalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk ingestion" + }, + "lastRunTotalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk ingestion from last run" + }, + "parsedCount": { + "type": "integer", + "default": 0, + "description": "The parsed count of the bulk ingestion" + }, + "validatedCount": { + "type": "integer", + "default": 0, + "description": "The validated count of the bulk ingestion" + }, + "executedCount": { + "type": "integer", + "default": 0, + "description": "The executed count of the bulk ingestion" + }, + "errorCount": { + "type": "integer", + "default": 0, + "description": "The error count of the bulk ingestion" + }, + "createdAt": { + "description": "The creation date of the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "parsedAt": { + "description": "The parsed date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "validatedAt": { + "description": "The validated date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "executedAt": { + "description": "The executed date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "400": { + "description": "Update Bulk Ingestion Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Get Bulk Ingestion Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, "scopes": [] }, { - "operationId": "delete_stores__storeId__bulk_ingestions__bulkIngestionId_", + "operationId": "delete_stores_storeId_bulk_ingestions_bulkIngestionId", "method": "DELETE", "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}", "summary": "Delete bulk ingestion", @@ -276,7 +2992,11 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -285,7 +3005,11 @@ "required": true, "description": "The Bulk Ingestion ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } } ], @@ -294,16 +3018,414 @@ "description": "Bulk ingestion deleted successfully" }, "400": { - "description": "See #/components/responses/Error" + "description": "Delete Bulk Ingestion Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "500": { - "description": "See #/components/responses/InternalServerError" + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, "scopes": [] }, { - "operationId": "post_stores__storeId__bulk_ingestions__bulkIngestionId__validations", + "operationId": "post_stores_storeId_bulk_ingestions_bulkIngestionId_validations", "method": "POST", "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/validations", "summary": "Validate bulk ingestion", @@ -314,7 +3436,11 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -323,7 +3449,11 @@ "required": true, "description": "The Bulk Ingestion ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } } ], @@ -331,23 +3461,810 @@ "200": { "description": "Bulk ingestion validated", "schema": { - "$ref": "./models/Bulkingestion.yaml" + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-ingestion.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Ingestion", + "type": "object", + "description": "A bulk ingestion object", + "properties": { + "id": { + "description": "The unique identifier for the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE" + }, + "entityType": { + "type": "string", + "default": "PRODUCT", + "description": "The type of the entity, currently only accepts PRODUCT" + }, + "status": { + "type": "string", + "default": "IDLE", + "description": "The status of the bulk ingestion, currently accepts IDLE, PARSING, \nVALIDATING, EXECUTING, PARSING_COMPLETE, PARSING_FAILED, \nVALIDATION_COMPLETE, EXECUTION_COMPLETE, VALIDATION_FAILED, \nEXECUTION_FAILED, EXPIRED, CANCELED\n" + }, + "intent": { + "type": "string", + "default": "WRITE", + "description": "The intent of the bulk ingestion, currently accepts WRITE, \nPROCESS\n" + }, + "mappedAttributes": { + "type": "object", + "description": "The mapped attributes for the bulk ingestion", + "additionalProperties": { + "type": "object", + "properties": { + "pointer": { + "description": "The pointer for the mapped attribute in the data source. It specifies \nthe path to the attribute within the data structure, such as a JSON \nobject or a CSV file. \n", + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "separator": { + "type": "string", + "description": "The separator used to split a string value into multiple parts. This is useful when a single attribute contains multiple values separated by a specific character." + }, + "position": { + "type": "integer", + "description": "The position of the mapped attribute within a split string. This is used in conjunction with the separator to specify which part of the split string to map." + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "boolean" + } + ] + } + } + }, + "example": { + "name": { + "pointer": "product_name" + }, + "sku": { + "pointer": "product_sku" + }, + "price.value": { + "pointer": "price" + }, + "variantOptionMapping[0].value": { + "pointer": "Variant Name", + "separator": "/", + "position": 1 + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The attributes for the bulk ingestion" + }, + "totalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk ingestion" + }, + "lastRunTotalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk ingestion from last run" + }, + "parsedCount": { + "type": "integer", + "default": 0, + "description": "The parsed count of the bulk ingestion" + }, + "validatedCount": { + "type": "integer", + "default": 0, + "description": "The validated count of the bulk ingestion" + }, + "executedCount": { + "type": "integer", + "default": 0, + "description": "The executed count of the bulk ingestion" + }, + "errorCount": { + "type": "integer", + "default": 0, + "description": "The error count of the bulk ingestion" + }, + "createdAt": { + "description": "The creation date of the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "parsedAt": { + "description": "The parsed date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "validatedAt": { + "description": "The validated date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "executedAt": { + "description": "The executed date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } } }, "400": { - "description": "See #/components/responses/Error" - }, - "404": { - "description": "See #/components/responses/Error" - }, - "500": { - "description": "See #/components/responses/InternalServerError" + "description": "Bulk Ingestion Validation Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Get Bulk Ingestion Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, "scopes": [] }, { - "operationId": "post_stores__storeId__bulk_ingestions__bulkIngestionId__items__index__validations", + "operationId": "post_stores_storeId_bulk_ingestions_bulkIngestionId_items_index_validations", "method": "POST", "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/items/{index}/validations", "summary": "Validate bulk ingestion by index", @@ -358,7 +4275,11 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -367,7 +4288,11 @@ "required": true, "description": "The Bulk Ingestion ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -383,23 +4308,810 @@ "200": { "description": "Bulk ingestion validated", "schema": { - "$ref": "./models/BulkIngestion.yaml" + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-ingestion.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Ingestion", + "type": "object", + "description": "A bulk ingestion object", + "properties": { + "id": { + "description": "The unique identifier for the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE" + }, + "entityType": { + "type": "string", + "default": "PRODUCT", + "description": "The type of the entity, currently only accepts PRODUCT" + }, + "status": { + "type": "string", + "default": "IDLE", + "description": "The status of the bulk ingestion, currently accepts IDLE, PARSING, \nVALIDATING, EXECUTING, PARSING_COMPLETE, PARSING_FAILED, \nVALIDATION_COMPLETE, EXECUTION_COMPLETE, VALIDATION_FAILED, \nEXECUTION_FAILED, EXPIRED, CANCELED\n" + }, + "intent": { + "type": "string", + "default": "WRITE", + "description": "The intent of the bulk ingestion, currently accepts WRITE, \nPROCESS\n" + }, + "mappedAttributes": { + "type": "object", + "description": "The mapped attributes for the bulk ingestion", + "additionalProperties": { + "type": "object", + "properties": { + "pointer": { + "description": "The pointer for the mapped attribute in the data source. It specifies \nthe path to the attribute within the data structure, such as a JSON \nobject or a CSV file. \n", + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "separator": { + "type": "string", + "description": "The separator used to split a string value into multiple parts. This is useful when a single attribute contains multiple values separated by a specific character." + }, + "position": { + "type": "integer", + "description": "The position of the mapped attribute within a split string. This is used in conjunction with the separator to specify which part of the split string to map." + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "boolean" + } + ] + } + } + }, + "example": { + "name": { + "pointer": "product_name" + }, + "sku": { + "pointer": "product_sku" + }, + "price.value": { + "pointer": "price" + }, + "variantOptionMapping[0].value": { + "pointer": "Variant Name", + "separator": "/", + "position": 1 + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The attributes for the bulk ingestion" + }, + "totalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk ingestion" + }, + "lastRunTotalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk ingestion from last run" + }, + "parsedCount": { + "type": "integer", + "default": 0, + "description": "The parsed count of the bulk ingestion" + }, + "validatedCount": { + "type": "integer", + "default": 0, + "description": "The validated count of the bulk ingestion" + }, + "executedCount": { + "type": "integer", + "default": 0, + "description": "The executed count of the bulk ingestion" + }, + "errorCount": { + "type": "integer", + "default": 0, + "description": "The error count of the bulk ingestion" + }, + "createdAt": { + "description": "The creation date of the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "parsedAt": { + "description": "The parsed date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "validatedAt": { + "description": "The validated date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "executedAt": { + "description": "The executed date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } } }, "400": { - "description": "See #/components/responses/Error" + "description": "Bulk Ingestion Validation Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "404": { - "description": "See #/components/responses/Error" + "description": "Get Bulk Ingestion Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "500": { - "description": "See #/components/responses/InternalServerError" + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, "scopes": [] }, { - "operationId": "post_stores__storeId__bulk_ingestions__bulkIngestionId__executions", + "operationId": "post_stores_storeId_bulk_ingestions_bulkIngestionId_executions", "method": "POST", "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/executions", "summary": "Execute bulk ingestion", @@ -410,7 +5122,11 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -419,7 +5135,11 @@ "required": true, "description": "The Bulk Ingestion ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } } ], @@ -427,26 +5147,6361 @@ "200": { "description": "Bulk ingestion executed", "schema": { - "$ref": "./models/Bulkingestion.yaml" - } - }, - "400": { - "description": "See #/components/responses/Error" - }, - "404": { - "description": "See #/components/responses/Error" - }, - "500": { - "description": "See #/components/responses/InternalServerError" + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-ingestion.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Ingestion", + "type": "object", + "description": "A bulk ingestion object", + "properties": { + "id": { + "description": "The unique identifier for the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE" + }, + "entityType": { + "type": "string", + "default": "PRODUCT", + "description": "The type of the entity, currently only accepts PRODUCT" + }, + "status": { + "type": "string", + "default": "IDLE", + "description": "The status of the bulk ingestion, currently accepts IDLE, PARSING, \nVALIDATING, EXECUTING, PARSING_COMPLETE, PARSING_FAILED, \nVALIDATION_COMPLETE, EXECUTION_COMPLETE, VALIDATION_FAILED, \nEXECUTION_FAILED, EXPIRED, CANCELED\n" + }, + "intent": { + "type": "string", + "default": "WRITE", + "description": "The intent of the bulk ingestion, currently accepts WRITE, \nPROCESS\n" + }, + "mappedAttributes": { + "type": "object", + "description": "The mapped attributes for the bulk ingestion", + "additionalProperties": { + "type": "object", + "properties": { + "pointer": { + "description": "The pointer for the mapped attribute in the data source. It specifies \nthe path to the attribute within the data structure, such as a JSON \nobject or a CSV file. \n", + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "separator": { + "type": "string", + "description": "The separator used to split a string value into multiple parts. This is useful when a single attribute contains multiple values separated by a specific character." + }, + "position": { + "type": "integer", + "description": "The position of the mapped attribute within a split string. This is used in conjunction with the separator to specify which part of the split string to map." + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "boolean" + } + ] + } + } + }, + "example": { + "name": { + "pointer": "product_name" + }, + "sku": { + "pointer": "product_sku" + }, + "price.value": { + "pointer": "price" + }, + "variantOptionMapping[0].value": { + "pointer": "Variant Name", + "separator": "/", + "position": 1 + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The attributes for the bulk ingestion" + }, + "totalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk ingestion" + }, + "lastRunTotalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk ingestion from last run" + }, + "parsedCount": { + "type": "integer", + "default": 0, + "description": "The parsed count of the bulk ingestion" + }, + "validatedCount": { + "type": "integer", + "default": 0, + "description": "The validated count of the bulk ingestion" + }, + "executedCount": { + "type": "integer", + "default": 0, + "description": "The executed count of the bulk ingestion" + }, + "errorCount": { + "type": "integer", + "default": 0, + "description": "The error count of the bulk ingestion" + }, + "createdAt": { + "description": "The creation date of the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "parsedAt": { + "description": "The parsed date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "validatedAt": { + "description": "The validated date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "executedAt": { + "description": "The executed date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "400": { + "description": "Bulk Ingestion Execution Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Get Bulk Ingestion Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [] + }, + { + "operationId": "post_stores_storeId_bulk_ingestions_bulkIngestionId_cancelations", + "method": "POST", + "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/cancelations", + "summary": "Cancel bulk ingestion", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The Store ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "bulkIngestionId", + "in": "path", + "required": true, + "description": "The Bulk Ingestion ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Bulk ingestion cancelled", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-ingestion.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Ingestion", + "type": "object", + "description": "A bulk ingestion object", + "properties": { + "id": { + "description": "The unique identifier for the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE" + }, + "entityType": { + "type": "string", + "default": "PRODUCT", + "description": "The type of the entity, currently only accepts PRODUCT" + }, + "status": { + "type": "string", + "default": "IDLE", + "description": "The status of the bulk ingestion, currently accepts IDLE, PARSING, \nVALIDATING, EXECUTING, PARSING_COMPLETE, PARSING_FAILED, \nVALIDATION_COMPLETE, EXECUTION_COMPLETE, VALIDATION_FAILED, \nEXECUTION_FAILED, EXPIRED, CANCELED\n" + }, + "intent": { + "type": "string", + "default": "WRITE", + "description": "The intent of the bulk ingestion, currently accepts WRITE, \nPROCESS\n" + }, + "mappedAttributes": { + "type": "object", + "description": "The mapped attributes for the bulk ingestion", + "additionalProperties": { + "type": "object", + "properties": { + "pointer": { + "description": "The pointer for the mapped attribute in the data source. It specifies \nthe path to the attribute within the data structure, such as a JSON \nobject or a CSV file. \n", + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "separator": { + "type": "string", + "description": "The separator used to split a string value into multiple parts. This is useful when a single attribute contains multiple values separated by a specific character." + }, + "position": { + "type": "integer", + "description": "The position of the mapped attribute within a split string. This is used in conjunction with the separator to specify which part of the split string to map." + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "boolean" + } + ] + } + } + }, + "example": { + "name": { + "pointer": "product_name" + }, + "sku": { + "pointer": "product_sku" + }, + "price.value": { + "pointer": "price" + }, + "variantOptionMapping[0].value": { + "pointer": "Variant Name", + "separator": "/", + "position": 1 + } + } + }, + "attributes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The attributes for the bulk ingestion" + }, + "totalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk ingestion" + }, + "lastRunTotalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk ingestion from last run" + }, + "parsedCount": { + "type": "integer", + "default": 0, + "description": "The parsed count of the bulk ingestion" + }, + "validatedCount": { + "type": "integer", + "default": 0, + "description": "The validated count of the bulk ingestion" + }, + "executedCount": { + "type": "integer", + "default": 0, + "description": "The executed count of the bulk ingestion" + }, + "errorCount": { + "type": "integer", + "default": 0, + "description": "The error count of the bulk ingestion" + }, + "createdAt": { + "description": "The creation date of the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "parsedAt": { + "description": "The parsed date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "validatedAt": { + "description": "The validated date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "executedAt": { + "description": "The executed date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk ingestion", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "400": { + "description": "Bulk Ingestion Cancellation Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Get Bulk Ingestion Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [] + }, + { + "operationId": "get_stores_storeId_bulk_ingestions_bulkIngestionId_items", + "method": "GET", + "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/items", + "summary": "Get bulk ingestion items", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The Store ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "bulkIngestionId", + "in": "path", + "required": true, + "description": "The Bulk Ingestion ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Get bulk ingestion items", + "schema": { + "type": "object", + "title": "Bulk Ingestion Items", + "description": "A list of bulk ingestion items", + "properties": { + "items": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-ingestion-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Ingestion Item", + "type": "object", + "description": "A bulk ingestion item object", + "properties": { + "id": { + "description": "The unique identifier for the bulk ingestion item", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "bulkIngestionId": { + "description": "The unique identifier for the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "status": { + "type": "string", + "default": "IDLE", + "description": "The status of the bulk ingestion item" + }, + "index": { + "type": "integer", + "description": "The index of the bulk ingestion item" + }, + "data": { + "type": "object", + "description": "The data for the bulk ingestion item", + "nullable": true, + "example": { + "name": "Product 1", + "sku": "SKU-1", + "price": { + "value": 100, + "currency": "USD" + } + } + }, + "error": { + "type": "string", + "description": "The error of the bulk ingestion item", + "nullable": true + }, + "createdAt": { + "description": "The creation date of the bulk ingestion item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk ingestion item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "validatedAt": { + "description": "The validated date of the bulk ingestion item", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "executedAt": { + "description": "The executed date of the bulk ingestion item", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "expiresAt": { + "description": "The expiry date of the bulk ingestion item", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "pageToken": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } + } + }, + "404": { + "description": "Get Bulk Ingestion Items Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [] + }, + { + "operationId": "get_stores_storeId_bulk_ingestions_bulkIngestionId_errors", + "method": "GET", + "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/errors", + "summary": "Get bulk ingestion errors", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The Store ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "bulkIngestionId", + "in": "path", + "required": true, + "description": "The Bulk Ingestion ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Get bulk ingestion errors", + "schema": { + "type": "object", + "title": "Bulk Ingestion Errors", + "description": "A list of bulk ingestion errors", + "properties": { + "errors": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "pageToken": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } + } + }, + "404": { + "description": "Get Bulk Ingestion Errors Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [] + }, + { + "operationId": "get_stores_storeId_bulk_ingestions_bulkIngestionId_overrides", + "method": "GET", + "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/overrides", + "summary": "Get bulk ingestion overrides", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The Store ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "bulkIngestionId", + "in": "path", + "required": true, + "description": "The Bulk Ingestion ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Get bulk ingestion overrides", + "schema": { + "type": "object", + "title": "Bulk Ingestion Overrides", + "description": "A list of bulk ingestion overrides", + "properties": { + "overrides": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-ingestion-override.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Ingestion Override", + "type": "object", + "description": "A bulk ingestion override object", + "properties": { + "id": { + "description": "The unique identifier for the bulk ingestion override", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "bulkIngestionId": { + "description": "The unique identifier for the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "op": { + "type": "string", + "description": "The operation of the override patch, can be add, remove, \nor replace\n", + "default": "replace" + }, + "path": { + "type": "string", + "description": "The path of the override, consists of an index and an \nattribute name\n", + "example": "/0/name" + }, + "value": { + "type": "string", + "description": "The value of the override" + }, + "createdAt": { + "description": "The creation date of the override", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the override", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "pageToken": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } + } + }, + "404": { + "description": "Get Bulk Ingestion Overrides Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [] + }, + { + "operationId": "put_stores_storeId_bulk_ingestions_bulkIngestionId_overrides", + "method": "PUT", + "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/overrides", + "summary": "Upsert an override", + "description": "Update an existing override or insert a new one if \nit does not already exist. Body must include a JSON\npatch object.\n", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The Store ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "bulkIngestionId", + "in": "path", + "required": true, + "description": "The Bulk Ingestion ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "contentType": "application/json", + "schema": { + "required": true, + "type": "object", + "properties": { + "op": { + "type": "string", + "enum": [ + "replace", + "remove", + "add" + ] + }, + "path": { + "type": "string" + }, + "value": { + "type": "string", + "nullable": true + } + } + } + }, + "responses": { + "200": { + "description": "Override upserted successfully", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-ingestion-override.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Ingestion Override", + "type": "object", + "description": "A bulk ingestion override object", + "properties": { + "id": { + "description": "The unique identifier for the bulk ingestion override", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "bulkIngestionId": { + "description": "The unique identifier for the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "op": { + "type": "string", + "description": "The operation of the override patch, can be add, remove, \nor replace\n", + "default": "replace" + }, + "path": { + "type": "string", + "description": "The path of the override, consists of an index and an \nattribute name\n", + "example": "/0/name" + }, + "value": { + "type": "string", + "description": "The value of the override" + }, + "createdAt": { + "description": "The creation date of the override", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the override", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "400": { + "description": "Upsert Override Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Override not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [] + }, + { + "operationId": "get_stores_storeId_bulk_ingestions_bulkIngestionId_overrides_index", + "method": "GET", + "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/overrides/{index}", + "summary": "Get overrides by index", + "description": "Get a list of overrides based on its index.\n", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The Store ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "bulkIngestionId", + "in": "path", + "required": true, + "description": "The Bulk Ingestion ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "override index", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "includes", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Overrides retrieved", + "schema": { + "type": "object", + "title": "Bulk Ingestion Overrides", + "description": "A list of bulk ingestion overrides", + "properties": { + "entries": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-ingestion-override.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Ingestion Override", + "type": "object", + "description": "A bulk ingestion override object", + "properties": { + "id": { + "description": "The unique identifier for the bulk ingestion override", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "bulkIngestionId": { + "description": "The unique identifier for the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "op": { + "type": "string", + "description": "The operation of the override patch, can be add, remove, \nor replace\n", + "default": "replace" + }, + "path": { + "type": "string", + "description": "The path of the override, consists of an index and an \nattribute name\n", + "example": "/0/name" + }, + "value": { + "type": "string", + "description": "The value of the override" + }, + "createdAt": { + "description": "The creation date of the override", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the override", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } + } + } + }, + "404": { + "description": "Override not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [] + }, + { + "operationId": "delete_stores_storeId_bulk_ingestions_bulkIngestionId_overrides_index", + "method": "DELETE", + "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/overrides/{index}", + "summary": "Delete overrides by index", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The Store ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "bulkIngestionId", + "in": "path", + "required": true, + "description": "The Bulk Ingestion ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "override index", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Overrides deleted", + "schema": { + "type": "object", + "properties": {} + } + }, + "400": { + "description": "Delete Overrides Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [] + }, + { + "operationId": "post_stores_storeId_bulk_ingestions_bulkIngestionId_override_batches", + "method": "POST", + "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/override-batches", + "summary": "Create, update, or delete a batch of overrides", + "description": "Create, update, or delete a batch of overrides for a bulk ingestion", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The Store ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "bulkIngestionId", + "in": "path", + "required": true, + "description": "The Bulk Ingestion ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "contentType": "application/json", + "schema": { + "type": "object", + "properties": { + "action": { + "type": "string", + "description": "The action to perform on the overrides, currently accepts \nPUT or DELETE\n" + }, + "overrides": { + "type": "array", + "items": { + "type": "object", + "properties": { + "op": { + "type": "string", + "enum": [ + "replace", + "remove", + "add" + ] + }, + "path": { + "type": "string" + }, + "value": { + "type": "string", + "nullable": true + } + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Override Batch PUT Success", + "schema": { + "type": "object", + "properties": { + "overrides": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-ingestion-override.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Ingestion Override", + "type": "object", + "description": "A bulk ingestion override object", + "properties": { + "id": { + "description": "The unique identifier for the bulk ingestion override", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "bulkIngestionId": { + "description": "The unique identifier for the bulk ingestion", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "op": { + "type": "string", + "description": "The operation of the override patch, can be add, remove, \nor replace\n", + "default": "replace" + }, + "path": { + "type": "string", + "description": "The path of the override, consists of an index and an \nattribute name\n", + "example": "/0/name" + }, + "value": { + "type": "string", + "description": "The value of the override" + }, + "createdAt": { + "description": "The creation date of the override", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the override", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "204": { + "description": "Override Batch DELETE Success", + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Bulk Ingestion Override Batch Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [] + }, + { + "operationId": "get_v1_commerce_stores_storeId_bulk_operations", + "method": "GET", + "path": "/v1/commerce/stores/{storeId}/bulk-operations", + "summary": "Get bulk operations", + "description": "Get bulk operations of a store", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The Store ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Successfully retrieved bulk operations", + "schema": { + "type": "object", + "properties": { + "bulkOperation": { + "type": "array", + "description": "The bulk operations", + "items": { + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-operation.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Operation", + "type": "object", + "description": "A bulk operation object", + "properties": { + "id": { + "description": "The unique identifier for the bulk operation", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE" + }, + "entityType": { + "type": "string", + "default": "PRODUCT", + "description": "The type of the entity, currently only accepts PRODUCT" + }, + "status": { + "type": "string", + "default": "PROCESSING", + "description": "The status of the bulk operation, can be PROCESSING, COMPLETED, \nCANCELED, or FAILED\n" + }, + "method": { + "type": "string", + "default": "PATCH", + "description": "The method of the bulk operation, currently accepts PATCH, PUT, and \nDELETE\n" + }, + "href": { + "type": "string", + "description": "The href of the bulk operation", + "example": "/v1/commerce/stores/:storeId/products/:productId" + }, + "results": { + "type": "array", + "description": "The results for this individual bulk operation request, only used \nwhen the bulk operation is processed synchronously\n" + }, + "totalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk operation" + }, + "processedCount": { + "type": "integer", + "default": 0, + "description": "The processed count of the bulk operation" + }, + "errorCount": { + "type": "integer", + "default": 0, + "description": "The error count of the bulk operation" + }, + "createdAt": { + "description": "The creation date of the bulk operation", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk operation", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "completedAt": { + "description": "The completed date of the bulk operation", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk operation", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, "scopes": [] }, { - "operationId": "post_stores__storeId__bulk_ingestions__bulkIngestionId__cancelations", + "operationId": "post_v1_commerce_stores_storeId_bulk_operations", "method": "POST", - "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/cancelations", - "summary": "Cancel bulk ingestion", + "path": "/v1/commerce/stores/{storeId}/bulk-operations", + "summary": "Create a bulk operation", + "description": "Create a new bulk operation", "parameters": [ { "name": "storeId", @@ -454,103 +11509,575 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" - } - }, - { - "name": "bulkIngestionId", - "in": "path", - "required": true, - "description": "The Bulk Ingestion ID", - "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } } ], - "responses": { - "200": { - "description": "Bulk ingestion cancelled", - "schema": { - "$ref": "./models/Bulkingestion.yaml" + "requestBody": { + "required": true, + "contentType": "application/json", + "schema": { + "type": "object", + "properties": { + "href": { + "type": "string", + "description": "The URL of the bulk operation", + "example": "/v1/commerce/stores/:storeId/products/:productId" + }, + "method": { + "type": "string", + "description": "The method of the bulk operation", + "example": "PATCH" + }, + "filter": { + "type": "string", + "description": "The optional filter of the bulk operation, should follow\n[OData URL Convention for filtering](http://docs.oasis-open.org/odata/odata/v4.01/cs01/part2-url-conventions/odata-v4.01-cs01-part2-url-conventions.html#sec_SystemQueryOptionfilter)\n", + "example": "status eq 'IDLE'" + }, + "query": { + "type": "string", + "description": "The optional query of the bulk operation", + "example": "type=PHYSICAL" + }, + "body": { + "type": "object", + "description": "The body of the bulk operation request", + "example": { + "name": "Product 1" + } + } } - }, - "400": { - "description": "See #/components/responses/Error" - }, - "404": { - "description": "See #/components/responses/Error" - }, - "500": { - "description": "See #/components/responses/InternalServerError" } }, - "scopes": [] - }, - { - "operationId": "get_stores__storeId__bulk_ingestions__bulkIngestionId__items", - "method": "GET", - "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/items", - "summary": "Get bulk ingestion items", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The Store ID", + "responses": { + "201": { + "description": "Bulk operation created", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "type": "object", + "properties": { + "bulkOperation": { + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-operation.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Operation", + "type": "object", + "description": "A bulk operation object", + "properties": { + "id": { + "description": "The unique identifier for the bulk operation", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE" + }, + "entityType": { + "type": "string", + "default": "PRODUCT", + "description": "The type of the entity, currently only accepts PRODUCT" + }, + "status": { + "type": "string", + "default": "PROCESSING", + "description": "The status of the bulk operation, can be PROCESSING, COMPLETED, \nCANCELED, or FAILED\n" + }, + "method": { + "type": "string", + "default": "PATCH", + "description": "The method of the bulk operation, currently accepts PATCH, PUT, and \nDELETE\n" + }, + "href": { + "type": "string", + "description": "The href of the bulk operation", + "example": "/v1/commerce/stores/:storeId/products/:productId" + }, + "results": { + "type": "array", + "description": "The results for this individual bulk operation request, only used \nwhen the bulk operation is processed synchronously\n" + }, + "totalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk operation" + }, + "processedCount": { + "type": "integer", + "default": 0, + "description": "The processed count of the bulk operation" + }, + "errorCount": { + "type": "integer", + "default": 0, + "description": "The error count of the bulk operation" + }, + "createdAt": { + "description": "The creation date of the bulk operation", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk operation", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "completedAt": { + "description": "The completed date of the bulk operation", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk operation", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } } }, - { - "name": "bulkIngestionId", - "in": "path", - "required": true, - "description": "The Bulk Ingestion ID", - "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" - } - } - ], - "responses": { - "200": { - "description": "Get bulk ingestion items", + "400": { + "description": "Bad Request", "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", - "title": "Bulk Ingestion Items", - "description": "A list of bulk ingestion items", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, "properties": { - "items": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, "items": { - "$ref": "./models/BulkIngestionItem.yaml" + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] } }, - "pageToken": { - "type": "string" - }, "links": { "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, "items": { - "$ref": "./common-types/v1/schemas/json/link-description.json" + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } - } + }, + "required": [ + "name", + "correlationId", + "message" + ] } }, - "404": { - "description": "See #/components/responses/Error" - }, "500": { - "description": "See #/components/responses/InternalServerError" + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, "scopes": [] }, { - "operationId": "get_stores__storeId__bulk_ingestions__bulkIngestionId__errors", + "operationId": "get_v1_commerce_stores_storeId_bulk_operations_bulkOperationId", "method": "GET", - "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/errors", - "summary": "Get bulk ingestion errors", + "path": "/v1/commerce/stores/{storeId}/bulk-operations/{bulkOperationId}", + "summary": "Get a bulk operation", + "description": "Get a bulk operation by ID", "parameters": [ { "name": "storeId", @@ -558,120 +12085,552 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { - "name": "bulkIngestionId", + "name": "bulkOperationId", "in": "path", "required": true, - "description": "The Bulk Ingestion ID", + "description": "The Bulk Operation ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } } ], "responses": { "200": { - "description": "Get bulk ingestion errors", + "description": "Successfully retrieved bulk operation", "schema": { "type": "object", - "title": "Bulk Ingestion Errors", - "description": "A list of bulk ingestion errors", "properties": { - "errors": { + "bulkOperation": { + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-operation.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Operation", + "type": "object", + "description": "A bulk operation object", + "properties": { + "id": { + "description": "The unique identifier for the bulk operation", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE" + }, + "entityType": { + "type": "string", + "default": "PRODUCT", + "description": "The type of the entity, currently only accepts PRODUCT" + }, + "status": { + "type": "string", + "default": "PROCESSING", + "description": "The status of the bulk operation, can be PROCESSING, COMPLETED, \nCANCELED, or FAILED\n" + }, + "method": { + "type": "string", + "default": "PATCH", + "description": "The method of the bulk operation, currently accepts PATCH, PUT, and \nDELETE\n" + }, + "href": { + "type": "string", + "description": "The href of the bulk operation", + "example": "/v1/commerce/stores/:storeId/products/:productId" + }, + "results": { + "type": "array", + "description": "The results for this individual bulk operation request, only used \nwhen the bulk operation is processed synchronously\n" + }, + "totalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk operation" + }, + "processedCount": { + "type": "integer", + "default": 0, + "description": "The processed count of the bulk operation" + }, + "errorCount": { + "type": "integer", + "default": 0, + "description": "The error count of the bulk operation" + }, + "createdAt": { + "description": "The creation date of the bulk operation", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk operation", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "completedAt": { + "description": "The completed date of the bulk operation", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk operation", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, "items": { - "$ref": "./common-types/v1/schemas/json/error.json" + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] } }, - "pageToken": { - "type": "string" - }, "links": { "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, "items": { - "$ref": "./common-types/v1/schemas/json/link-description.json" + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } - } + }, + "required": [ + "name", + "correlationId", + "message" + ] } }, - "404": { - "description": "See #/components/responses/Error" - }, "500": { - "description": "See #/components/responses/InternalServerError" - } - }, - "scopes": [] - }, - { - "operationId": "get_stores__storeId__bulk_ingestions__bulkIngestionId__overrides", - "method": "GET", - "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/overrides", - "summary": "Get bulk ingestion overrides", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The Store ID", - "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" - } - }, - { - "name": "bulkIngestionId", - "in": "path", - "required": true, - "description": "The Bulk Ingestion ID", - "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" - } - } - ], - "responses": { - "200": { - "description": "Get bulk ingestion overrides", + "description": "Internal Server Error", "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", - "title": "Bulk Ingestion Overrides", - "description": "A list of bulk ingestion overrides", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, "properties": { - "overrides": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, "items": { - "$ref": "./models/BulkIngestionOverride.yaml" + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] } }, - "pageToken": { - "type": "string" - }, "links": { "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, "items": { - "$ref": "./common-types/v1/schemas/json/link-description.json" + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } - } + }, + "required": [ + "name", + "correlationId", + "message" + ] } - }, - "404": { - "description": "See #/components/responses/Error" - }, - "500": { - "description": "See #/components/responses/InternalServerError" } }, "scopes": [] }, { - "operationId": "put_stores__storeId__bulk_ingestions__bulkIngestionId__overrides", - "method": "PUT", - "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/overrides", - "summary": "Upsert an override", - "description": "Update an existing override or insert a new one if \nit does not already exist. Body must include a JSON\npatch object.\n", + "operationId": "delete_v1_commerce_stores_storeId_bulk_operations_bulkOperationId", + "method": "DELETE", + "path": "/v1/commerce/stores/{storeId}/bulk-operations/{bulkOperationId}", + "summary": "Cancel a bulk operation", + "description": "Cancel an ongoing bulk operation", "parameters": [ { "name": "storeId", @@ -679,52 +12638,552 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { - "name": "bulkIngestionId", + "name": "bulkOperationId", "in": "path", "required": true, - "description": "The Bulk Ingestion ID", + "description": "The Bulk Operation ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } } ], - "requestBody": { - "required": false, - "contentType": "application/json", - "schema": { - "$ref": "#/components/schemas/JSONPatch", - "required": true - } - }, "responses": { - "200": { - "description": "Override upserted successfully", + "204": { + "description": "Bulk operation cancelled", "schema": { - "$ref": "./models/BulkIngestionOverride.yaml" + "type": "object", + "properties": { + "bulkOperation": { + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-operation.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Operation", + "type": "object", + "description": "A bulk operation object", + "properties": { + "id": { + "description": "The unique identifier for the bulk operation", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE" + }, + "entityType": { + "type": "string", + "default": "PRODUCT", + "description": "The type of the entity, currently only accepts PRODUCT" + }, + "status": { + "type": "string", + "default": "PROCESSING", + "description": "The status of the bulk operation, can be PROCESSING, COMPLETED, \nCANCELED, or FAILED\n" + }, + "method": { + "type": "string", + "default": "PATCH", + "description": "The method of the bulk operation, currently accepts PATCH, PUT, and \nDELETE\n" + }, + "href": { + "type": "string", + "description": "The href of the bulk operation", + "example": "/v1/commerce/stores/:storeId/products/:productId" + }, + "results": { + "type": "array", + "description": "The results for this individual bulk operation request, only used \nwhen the bulk operation is processed synchronously\n" + }, + "totalCount": { + "type": "integer", + "default": 0, + "description": "The total count of the bulk operation" + }, + "processedCount": { + "type": "integer", + "default": 0, + "description": "The processed count of the bulk operation" + }, + "errorCount": { + "type": "integer", + "default": 0, + "description": "The error count of the bulk operation" + }, + "createdAt": { + "description": "The creation date of the bulk operation", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk operation", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "completedAt": { + "description": "The completed date of the bulk operation", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk operation", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } } }, "400": { - "description": "See #/components/responses/Error" - }, - "404": { - "description": "See #/components/responses/Error" + "description": "Bad Request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "500": { - "description": "See #/components/responses/InternalServerError" + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, "scopes": [] }, { - "operationId": "get_stores__storeId__bulk_ingestions__bulkIngestionId__overrides__index_", + "operationId": "get_v1_commerce_stores_storeId_bulk_operations_bulkOperationId_errors", "method": "GET", - "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/overrides/{index}", - "summary": "Get overrides by index", - "description": "Get a list of overrides based on its index.\n", + "path": "/v1/commerce/stores/{storeId}/bulk-operations/{bulkOperationId}/errors", + "summary": "Get bulk operation errors", + "description": "Get errors during a bulk operation", "parameters": [ { "name": "storeId", @@ -732,28 +13191,38 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { - "name": "bulkIngestionId", + "name": "bulkOperationId", "in": "path", "required": true, - "description": "The Bulk Ingestion ID", + "description": "The Bulk Operation ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { - "name": "override index", - "in": "path", - "required": true, + "name": "pageSize", + "in": "query", + "required": false, "schema": { - "type": "string" + "type": "integer", + "format": "int32", + "minimum": 1 } }, { - "name": "includes", + "name": "pageToken", "in": "query", "required": false, "schema": { @@ -763,35 +13232,756 @@ ], "responses": { "200": { - "description": "Overrides retrieved", + "description": "Successfully retrieved bulk operation errors", "schema": { "type": "object", - "title": "Bulk Ingestion Overrides", - "description": "A list of bulk ingestion overrides", "properties": { - "entries": { + "errors": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/bulk-ingestions/bulk-operation-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Operation Item", + "type": "object", + "description": "A bulk operation item object", + "properties": { + "id": { + "description": "The unique identifier for the bulk operation item", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "bulkOperationId": { + "description": "The unique identifier for the bulk operation", + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource" + }, + "status": { + "type": "string", + "default": "PROCESSING", + "description": "The status of the bulk operation item, can be PROCESSING, COMPLETED, \nCANCELED, or FAILED\n" + }, + "href": { + "type": "string", + "description": "The href of the bulk operation", + "example": "/v1/commerce/stores/:storeId/products/:productId" + }, + "error": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + }, + "createdAt": { + "description": "The creation date of the bulk operation item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk operation item", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "processedAt": { + "description": "The processed date of the bulk operation item", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk operation item", + "nullable": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "pageToken": { + "type": "string", + "description": "The page token" + }, + "links": { "type": "array", + "description": "The links", "items": { - "$ref": "./models/BulkIngestionOverride.yaml" + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } } } }, - "404": { - "description": "See #/components/responses/Error" + "400": { + "description": "Bad Request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "500": { - "description": "See #/components/responses/InternalServerError" + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, "scopes": [] }, { - "operationId": "delete_stores__storeId__bulk_ingestions__bulkIngestionId__overrides__index_", - "method": "DELETE", - "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/overrides/{index}", - "summary": "Delete overrides by index", + "operationId": "get_v1_commerce_stores_storeId_bulk_exports", + "method": "GET", + "path": "/v1/commerce/stores/{storeId}/bulk-exports", + "summary": "Get bulk exports", "parameters": [ { "name": "storeId", @@ -799,181 +13989,637 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" - } - }, - { - "name": "bulkIngestionId", - "in": "path", - "required": true, - "description": "The Bulk Ingestion ID", - "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { - "name": "override index", - "in": "path", - "required": true, + "name": "filter", + "in": "query", + "required": false, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "Overrides deleted", - "schema": { - "type": "object", - "properties": {} - } - }, - "400": { - "description": "See #/components/responses/Error" }, - "500": { - "description": "See #/components/responses/InternalServerError" - } - }, - "scopes": [] - }, - { - "operationId": "post_stores__storeId__bulk_ingestions__bulkIngestionId__override_batches", - "method": "POST", - "path": "/stores/{storeId}/bulk-ingestions/{bulkIngestionId}/override-batches", - "summary": "Create, update, or delete a batch of overrides", - "description": "Create, update, or delete a batch of overrides for a bulk ingestion", - "parameters": [ { - "name": "storeId", - "in": "path", - "required": true, - "description": "The Store ID", + "name": "pageSize", + "in": "query", + "required": false, "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "type": "integer", + "format": "int32", + "minimum": 1 } }, { - "name": "bulkIngestionId", - "in": "path", - "required": true, - "description": "The Bulk Ingestion ID", + "name": "pageToken", + "in": "query", + "required": false, "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "type": "string" } } ], - "requestBody": { - "required": false, - "contentType": "application/json", - "schema": { - "type": "object", - "properties": { - "action": { - "type": "string", - "description": "The action to perform on the overrides, currently accepts \nPUT or DELETE\n" - }, - "overrides": { - "type": "array", - "items": { - "$ref": "#/components/schemas/JSONPatch" - } - } - } - } - }, "responses": { - "201": { - "description": "Override Batch PUT Success", + "200": { + "description": "Get bulk exports", "schema": { + "title": "Bulk Exports", + "description": "A list of bulk exports", "type": "object", "properties": { - "overrides": { + "bulkExports": { "type": "array", + "description": "The bulk exports", "items": { - "$ref": "./models/BulkIngestionOverride.yaml" + "$id": "https://godaddy.com/schemas/commerce/bulk-operations/bulk-export.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Export", + "type": "object", + "description": "A bulk export object", + "properties": { + "id": { + "description": "The unique identifier for the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource", + "readOnly": true + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE", + "readOnly": true + }, + "exportType": { + "type": "string", + "description": "The type of bulk export, currently accepts one of CATALOG, CATALOG_V2_TO_V1" + }, + "status": { + "type": "string", + "default": "PENDING", + "description": "The status of the bulk export, currently PENDING, PROCESSING,\nEXPORTING, COMPLETED, FAILED, CANCELED\n", + "readOnly": true + }, + "targetFormat": { + "type": "string", + "description": "The target format of the bulk export, currently accepts CSV\n" + }, + "query": { + "type": "object", + "description": "The query for the bulk export", + "skuGroupIds": { + "type": "object", + "required": false, + "description": "The SKU group IDs to filter the bulk export. To export\nall SKU groups, omit this field.\n", + "properties": { + "in": { + "description": "The list of SKU group IDs to filter the bulk export. If the list is \nan empty array, the bulk export will not include any SKU groups.\n", + "type": "array", + "required": true, + "items": { + "type": "string" + } + } + } + }, + "example": { + "skuGroupIds": { + "in": [ + "sku-group-id-1", + "sku-group-id-2" + ] + } + } + }, + "errorMessage": { + "type": "string", + "description": "Message from error that occurred during the bulk export", + "nullable": true, + "readOnly": true + }, + "createdAt": { + "description": "The creation date of the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "exportedAt": { + "description": "The date of the bulk export file was exported", + "nullable": true, + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk export", + "nullable": true, + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } } }, - "errors": { + "pageToken": { + "type": "string", + "description": "The page token" + }, + "links": { "type": "array", + "description": "The links", "items": { - "type": "string" + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } } } }, - "204": { - "description": "Override Batch DELETE Success", + "404": { + "description": "Get Bulk Exports Error", "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, "properties": { - "errors": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, "items": { - "type": "string" + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } - } + }, + "required": [ + "name", + "correlationId", + "message" + ] } }, - "422": { - "description": "See #/components/responses/Error" - }, "500": { - "description": "See #/components/responses/InternalServerError" - } - }, - "scopes": [] - }, - { - "operationId": "get_v1_commerce_stores__storeId__bulk_operations", - "method": "GET", - "path": "/v1/commerce/stores/{storeId}/bulk-operations", - "summary": "Get bulk operations", - "description": "Get bulk operations of a store", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The Store ID", - "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" - } - } - ], - "responses": { - "200": { - "description": "Successfully retrieved bulk operations", + "description": "Internal Server Error", "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, "properties": { - "bulkOperation": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { "type": "array", - "description": "The bulk operations", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, "items": { - "$ref": "./models/BulkOperation.yaml" + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } - } + }, + "required": [ + "name", + "correlationId", + "message" + ] } - }, - "400": { - "description": "See #/components/responses/Error" - }, - "500": { - "description": "See #/components/responses/InternalServerError" } }, "scopes": [] }, { - "operationId": "post_v1_commerce_stores__storeId__bulk_operations", + "operationId": "post_v1_commerce_stores_storeId_bulk_exports", "method": "POST", - "path": "/v1/commerce/stores/{storeId}/bulk-operations", - "summary": "Create a bulk operation", - "description": "Create a new bulk operation", + "path": "/v1/commerce/stores/{storeId}/bulk-exports", + "summary": "Create bulk export", "parameters": [ { "name": "storeId", @@ -981,245 +14627,724 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } } ], "requestBody": { - "required": true, + "required": false, "contentType": "application/json", "schema": { + "$id": "https://godaddy.com/schemas/commerce/bulk-operations/bulk-export.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Export", "type": "object", + "description": "A bulk export object", "properties": { - "href": { + "id": { + "description": "The unique identifier for the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "string", - "description": "The URL of the bulk operation", - "example": "/v1/commerce/stores/:storeId/products/:productId" + "format": "uuid" }, - "method": { + "resourceId": { "type": "string", - "description": "The method of the bulk operation", - "example": "PATCH" + "description": "The unique identifier for the resource", + "readOnly": true }, - "filter": { + "resourceType": { "type": "string", - "description": "The optional filter of the bulk operation, should follow\n[OData URL Convention for filtering](http://docs.oasis-open.org/odata/odata/v4.01/cs01/part2-url-conventions/odata-v4.01-cs01-part2-url-conventions.html#sec_SystemQueryOptionfilter)\n", - "example": "status eq 'IDLE'" + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE", + "readOnly": true }, - "query": { + "exportType": { "type": "string", - "description": "The optional query of the bulk operation", - "example": "type=PHYSICAL" + "description": "The type of bulk export, currently accepts one of CATALOG, CATALOG_V2_TO_V1" }, - "body": { + "status": { + "type": "string", + "default": "PENDING", + "description": "The status of the bulk export, currently PENDING, PROCESSING,\nEXPORTING, COMPLETED, FAILED, CANCELED\n", + "readOnly": true + }, + "targetFormat": { + "type": "string", + "description": "The target format of the bulk export, currently accepts CSV\n" + }, + "query": { "type": "object", - "description": "The body of the bulk operation request", + "description": "The query for the bulk export", + "skuGroupIds": { + "type": "object", + "required": false, + "description": "The SKU group IDs to filter the bulk export. To export\nall SKU groups, omit this field.\n", + "properties": { + "in": { + "description": "The list of SKU group IDs to filter the bulk export. If the list is \nan empty array, the bulk export will not include any SKU groups.\n", + "type": "array", + "required": true, + "items": { + "type": "string" + } + } + } + }, "example": { - "name": "Product 1" - } - } - } - } - }, - "responses": { - "201": { - "description": "Bulk operation created", - "schema": { - "type": "object", - "properties": { - "bulkOperation": { - "$ref": "./models/BulkOperation.yaml" - } - } - } - }, - "400": { - "description": "See #/components/responses/Error" - }, - "500": { - "description": "See #/components/responses/InternalServerError" - } - }, - "scopes": [] - }, - { - "operationId": "get_v1_commerce_stores__storeId__bulk_operations__bulkOperationId_", - "method": "GET", - "path": "/v1/commerce/stores/{storeId}/bulk-operations/{bulkOperationId}", - "summary": "Get a bulk operation", - "description": "Get a bulk operation by ID", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The Store ID", - "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" - } - }, - { - "name": "bulkOperationId", - "in": "path", - "required": true, - "description": "The Bulk Operation ID", - "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" - } - } - ], - "responses": { - "200": { - "description": "Successfully retrieved bulk operation", - "schema": { - "type": "object", - "properties": { - "bulkOperation": { - "$ref": "./models/BulkOperation.yaml" + "skuGroupIds": { + "in": [ + "sku-group-id-1", + "sku-group-id-2" + ] + } } - } - } - }, - "400": { - "description": "See #/components/responses/Error" - }, - "500": { - "description": "See #/components/responses/InternalServerError" - } - }, - "scopes": [] - }, - { - "operationId": "delete_v1_commerce_stores__storeId__bulk_operations__bulkOperationId_", - "method": "DELETE", - "path": "/v1/commerce/stores/{storeId}/bulk-operations/{bulkOperationId}", - "summary": "Cancel a bulk operation", - "description": "Cancel an ongoing bulk operation", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The Store ID", - "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" - } - }, - { - "name": "bulkOperationId", - "in": "path", - "required": true, - "description": "The Bulk Operation ID", - "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + }, + "errorMessage": { + "type": "string", + "description": "Message from error that occurred during the bulk export", + "nullable": true, + "readOnly": true + }, + "createdAt": { + "description": "The creation date of the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "exportedAt": { + "description": "The date of the bulk export file was exported", + "nullable": true, + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk export", + "nullable": true, + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } } } - ], + }, "responses": { - "204": { - "description": "Bulk operation cancelled", + "201": { + "description": "Create bulk export", "schema": { + "title": "Bulk Export", + "description": "A bulk export object", "type": "object", "properties": { - "bulkOperation": { - "$ref": "./models/BulkOperation.yaml" + "bulkExport": { + "$id": "https://godaddy.com/schemas/commerce/bulk-operations/bulk-export.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Export", + "type": "object", + "description": "A bulk export object", + "properties": { + "id": { + "description": "The unique identifier for the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource", + "readOnly": true + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE", + "readOnly": true + }, + "exportType": { + "type": "string", + "description": "The type of bulk export, currently accepts one of CATALOG, CATALOG_V2_TO_V1" + }, + "status": { + "type": "string", + "default": "PENDING", + "description": "The status of the bulk export, currently PENDING, PROCESSING,\nEXPORTING, COMPLETED, FAILED, CANCELED\n", + "readOnly": true + }, + "targetFormat": { + "type": "string", + "description": "The target format of the bulk export, currently accepts CSV\n" + }, + "query": { + "type": "object", + "description": "The query for the bulk export", + "skuGroupIds": { + "type": "object", + "required": false, + "description": "The SKU group IDs to filter the bulk export. To export\nall SKU groups, omit this field.\n", + "properties": { + "in": { + "description": "The list of SKU group IDs to filter the bulk export. If the list is \nan empty array, the bulk export will not include any SKU groups.\n", + "type": "array", + "required": true, + "items": { + "type": "string" + } + } + } + }, + "example": { + "skuGroupIds": { + "in": [ + "sku-group-id-1", + "sku-group-id-2" + ] + } + } + }, + "errorMessage": { + "type": "string", + "description": "Message from error that occurred during the bulk export", + "nullable": true, + "readOnly": true + }, + "createdAt": { + "description": "The creation date of the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "exportedAt": { + "description": "The date of the bulk export file was exported", + "nullable": true, + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk export", + "nullable": true, + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + }, + "links": { + "type": "array", + "description": "Links to the newly created bulk export.", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } } } } }, "400": { - "description": "See #/components/responses/Error" - }, - "500": { - "description": "See #/components/responses/InternalServerError" - } - }, - "scopes": [] - }, - { - "operationId": "get_v1_commerce_stores__storeId__bulk_operations__bulkOperationId__errors", - "method": "GET", - "path": "/v1/commerce/stores/{storeId}/bulk-operations/{bulkOperationId}/errors", - "summary": "Get bulk operation errors", - "description": "Get errors during a bulk operation", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The Store ID", - "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" - } - }, - { - "name": "bulkOperationId", - "in": "path", - "required": true, - "description": "The Bulk Operation ID", - "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" - } - }, - { - "name": "pageSize", - "in": "query", - "required": false, + "description": "Post Bulk Exports Error", "schema": { - "type": "integer", - "format": "int32", - "minimum": 1 + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] } }, - { - "name": "pageToken", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successfully retrieved bulk operation errors", + "500": { + "description": "Internal Server Error", "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, "properties": { - "errors": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, "items": { - "$ref": "./models/BulkOperationItem.yaml" + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] } }, - "pageToken": { - "type": "string", - "description": "The page token" - }, "links": { "type": "array", - "description": "The links", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, "items": { - "$ref": "./common-types/v1/schemas/json/link-description.json" + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } - } + }, + "required": [ + "name", + "correlationId", + "message" + ] } - }, - "400": { - "description": "See #/components/responses/Error" - }, - "500": { - "description": "See #/components/responses/InternalServerError" } }, "scopes": [] }, { - "operationId": "get_v1_commerce_stores__storeId__bulk_exports", + "operationId": "get_v1_commerce_stores_storeId_bulk_exports_bulkExportId", "method": "GET", - "path": "/v1/commerce/stores/{storeId}/bulk-exports", - "summary": "Get bulk exports", + "path": "/v1/commerce/stores/{storeId}/bulk-exports/{bulkExportId}", + "summary": "Get bulk export", "parameters": [ { "name": "storeId", @@ -1227,179 +15352,608 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" - } - }, - { - "name": "filter", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "minimum": 1 + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { - "name": "pageToken", - "in": "query", - "required": false, + "name": "bulkExportId", + "in": "path", + "required": true, + "description": "The Bulk Export ID", "schema": { - "type": "string" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } } ], "responses": { "200": { - "description": "Get bulk exports", + "description": "Get bulk export", "schema": { - "title": "Bulk Exports", - "description": "A list of bulk exports", + "bulkExport": { + "$id": "https://godaddy.com/schemas/commerce/bulk-operations/bulk-export.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Export", + "type": "object", + "description": "A bulk export object", + "properties": { + "id": { + "description": "The unique identifier for the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource", + "readOnly": true + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE", + "readOnly": true + }, + "exportType": { + "type": "string", + "description": "The type of bulk export, currently accepts one of CATALOG, CATALOG_V2_TO_V1" + }, + "status": { + "type": "string", + "default": "PENDING", + "description": "The status of the bulk export, currently PENDING, PROCESSING,\nEXPORTING, COMPLETED, FAILED, CANCELED\n", + "readOnly": true + }, + "targetFormat": { + "type": "string", + "description": "The target format of the bulk export, currently accepts CSV\n" + }, + "query": { + "type": "object", + "description": "The query for the bulk export", + "skuGroupIds": { + "type": "object", + "required": false, + "description": "The SKU group IDs to filter the bulk export. To export\nall SKU groups, omit this field.\n", + "properties": { + "in": { + "description": "The list of SKU group IDs to filter the bulk export. If the list is \nan empty array, the bulk export will not include any SKU groups.\n", + "type": "array", + "required": true, + "items": { + "type": "string" + } + } + } + }, + "example": { + "skuGroupIds": { + "in": [ + "sku-group-id-1", + "sku-group-id-2" + ] + } + } + }, + "errorMessage": { + "type": "string", + "description": "Message from error that occurred during the bulk export", + "nullable": true, + "readOnly": true + }, + "createdAt": { + "description": "The creation date of the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "exportedAt": { + "description": "The date of the bulk export file was exported", + "nullable": true, + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk export", + "nullable": true, + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + }, + "links": { + "type": "array", + "description": "Links to self and, if available, next step.", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } + }, + "404": { + "description": "Get Bulk Export Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, "properties": { - "bulkExports": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { "type": "array", - "description": "The bulk exports", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, "items": { - "$ref": "./models/BulkExport.yaml" + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] } }, - "pageToken": { - "type": "string", - "description": "The page token" - }, "links": { "type": "array", - "description": "The links", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, "items": { - "$ref": "./common-types/v1/schemas/json/link-description.json" + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } - } + }, + "required": [ + "name", + "correlationId", + "message" + ] } }, - "404": { - "description": "See #/components/responses/Error" - }, "500": { - "description": "See #/components/responses/InternalServerError" - } - }, - "scopes": [] - }, - { - "operationId": "post_v1_commerce_stores__storeId__bulk_exports", - "method": "POST", - "path": "/v1/commerce/stores/{storeId}/bulk-exports", - "summary": "Create bulk export", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The Store ID", - "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" - } - } - ], - "requestBody": { - "required": false, - "contentType": "application/json", - "schema": { - "$ref": "./models/BulkExport.yaml" - } - }, - "responses": { - "201": { - "description": "Create bulk export", + "description": "Internal Server Error", "schema": { - "title": "Bulk Export", - "description": "A bulk export object", + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, "properties": { - "bulkExport": { - "$ref": "./models/BulkExport.yaml" + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } }, "links": { "type": "array", - "description": "Links to the newly created bulk export.", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, "items": { - "$ref": "./common-types/v1/schemas/json/link-description.json" + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } - } - } - }, - "400": { - "description": "See #/components/responses/Error" - }, - "500": { - "description": "See #/components/responses/InternalServerError" - } - }, - "scopes": [] - }, - { - "operationId": "get_v1_commerce_stores__storeId__bulk_exports__bulkExportId_", - "method": "GET", - "path": "/v1/commerce/stores/{storeId}/bulk-exports/{bulkExportId}", - "summary": "Get bulk export", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The Store ID", - "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" - } - }, - { - "name": "bulkExportId", - "in": "path", - "required": true, - "description": "The Bulk Export ID", - "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" - } - } - ], - "responses": { - "200": { - "description": "Get bulk export", - "schema": { - "bulkExport": { - "$ref": "./models/BulkExport.yaml" }, - "links": { - "type": "array", - "description": "Links to self and, if available, next step.", - "items": { - "$ref": "./common-types/v1/schemas/json/link-description.json" - } - } + "required": [ + "name", + "correlationId", + "message" + ] } - }, - "404": { - "description": "See #/components/responses/Error" - }, - "500": { - "description": "See #/components/responses/InternalServerError" } }, "scopes": [] }, { - "operationId": "post_v1_commerce_stores__storeId__bulk_exports__bulkExportId__cancelations", + "operationId": "post_v1_commerce_stores_storeId_bulk_exports_bulkExportId_cancelations", "method": "POST", "path": "/v1/commerce/stores/{storeId}/bulk-exports/{bulkExportId}/cancelations", "summary": "Cancel bulk export", @@ -1410,7 +15964,11 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -1419,7 +15977,11 @@ "required": true, "description": "The Bulk Export ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } } ], @@ -1428,31 +15990,784 @@ "description": "Bulk export cancelled", "schema": { "bulkExport": { - "$ref": "./models/BulkExport.yaml" + "$id": "https://godaddy.com/schemas/commerce/bulk-operations/bulk-export.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Export", + "type": "object", + "description": "A bulk export object", + "properties": { + "id": { + "description": "The unique identifier for the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource", + "readOnly": true + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE", + "readOnly": true + }, + "exportType": { + "type": "string", + "description": "The type of bulk export, currently accepts one of CATALOG, CATALOG_V2_TO_V1" + }, + "status": { + "type": "string", + "default": "PENDING", + "description": "The status of the bulk export, currently PENDING, PROCESSING,\nEXPORTING, COMPLETED, FAILED, CANCELED\n", + "readOnly": true + }, + "targetFormat": { + "type": "string", + "description": "The target format of the bulk export, currently accepts CSV\n" + }, + "query": { + "type": "object", + "description": "The query for the bulk export", + "skuGroupIds": { + "type": "object", + "required": false, + "description": "The SKU group IDs to filter the bulk export. To export\nall SKU groups, omit this field.\n", + "properties": { + "in": { + "description": "The list of SKU group IDs to filter the bulk export. If the list is \nan empty array, the bulk export will not include any SKU groups.\n", + "type": "array", + "required": true, + "items": { + "type": "string" + } + } + } + }, + "example": { + "skuGroupIds": { + "in": [ + "sku-group-id-1", + "sku-group-id-2" + ] + } + } + }, + "errorMessage": { + "type": "string", + "description": "Message from error that occurred during the bulk export", + "nullable": true, + "readOnly": true + }, + "createdAt": { + "description": "The creation date of the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "exportedAt": { + "description": "The date of the bulk export file was exported", + "nullable": true, + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk export", + "nullable": true, + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } }, "links": { "type": "array", "description": "Link to the cancelled bulk export.", "items": { - "$ref": "./common-types/v1/schemas/json/link-description.json" + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } } }, "400": { - "description": "See #/components/responses/Error" + "description": "Bulk Export Cancellation Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "404": { - "description": "See #/components/responses/Error" + "description": "Get Bulk Export Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "500": { - "description": "See #/components/responses/InternalServerError" + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, "scopes": [] }, { - "operationId": "get_v1_commerce_stores__storeId__bulk_exports__bulkExportId__downloads", + "operationId": "get_v1_commerce_stores_storeId_bulk_exports_bulkExportId_downloads", "method": "GET", "path": "/v1/commerce/stores/{storeId}/bulk-exports/{bulkExportId}/downloads", "summary": "Get bulk export downloads", @@ -1463,7 +16778,11 @@ "required": true, "description": "The Store ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -1472,7 +16791,11 @@ "required": true, "description": "The Bulk Export ID", "schema": { - "$ref": "./common-types/v1/schemas/json/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -1490,28 +16813,781 @@ "description": "Bulk export with download links", "schema": { "bulkExport": { - "$ref": "./models/BulkExport.yaml" + "$id": "https://godaddy.com/schemas/commerce/bulk-operations/bulk-export.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bulk Export", + "type": "object", + "description": "A bulk export object", + "properties": { + "id": { + "description": "The unique identifier for the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "type": "string", + "description": "The unique identifier for the resource", + "readOnly": true + }, + "resourceType": { + "type": "string", + "default": "STORE", + "description": "The type of the resource, currently only accepts STORE", + "readOnly": true + }, + "exportType": { + "type": "string", + "description": "The type of bulk export, currently accepts one of CATALOG, CATALOG_V2_TO_V1" + }, + "status": { + "type": "string", + "default": "PENDING", + "description": "The status of the bulk export, currently PENDING, PROCESSING,\nEXPORTING, COMPLETED, FAILED, CANCELED\n", + "readOnly": true + }, + "targetFormat": { + "type": "string", + "description": "The target format of the bulk export, currently accepts CSV\n" + }, + "query": { + "type": "object", + "description": "The query for the bulk export", + "skuGroupIds": { + "type": "object", + "required": false, + "description": "The SKU group IDs to filter the bulk export. To export\nall SKU groups, omit this field.\n", + "properties": { + "in": { + "description": "The list of SKU group IDs to filter the bulk export. If the list is \nan empty array, the bulk export will not include any SKU groups.\n", + "type": "array", + "required": true, + "items": { + "type": "string" + } + } + } + }, + "example": { + "skuGroupIds": { + "in": [ + "sku-group-id-1", + "sku-group-id-2" + ] + } + } + }, + "errorMessage": { + "type": "string", + "description": "Message from error that occurred during the bulk export", + "nullable": true, + "readOnly": true + }, + "createdAt": { + "description": "The creation date of the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The update date of the bulk export", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "exportedAt": { + "description": "The date of the bulk export file was exported", + "nullable": true, + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The canceled date of the bulk export", + "nullable": true, + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } }, "links": { "type": "array", "description": "Links to self and download.", "items": { - "$ref": "./common-types/v1/schemas/json/link-description.json" + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } } }, "400": { - "description": "See #/components/responses/Error" + "description": "Bulk Export Cancellation Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "404": { - "description": "See #/components/responses/Error" + "description": "Get Bulk Export Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "500": { - "description": "See #/components/responses/InternalServerError" + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, "scopes": [] } ] -} +} \ No newline at end of file diff --git a/src/cli/schemas/api/businesses.json b/src/cli/schemas/api/businesses.json index b0cc4e0..71203d7 100644 --- a/src/cli/schemas/api/businesses.json +++ b/src/cli/schemas/api/businesses.json @@ -76,14 +76,859 @@ "200": { "description": "Business List", "schema": { - "$ref": "./models/BusinessList.yaml" + "$id": "https://godaddy.com/schemas/commerce/business-list.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store List", + "type": "object", + "description": "Resource representing a list of Businesses", + "properties": { + "items": { + "description": "Array containing the current page of Businesses", + "items": { + "$id": "https://godaddy.com/schemas/commerce/business.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Business", + "description": "Business resource represents a merchant business", + "properties": { + "activeSince": { + "type": "string", + "description": "This is a response only field. It is set internally and returned in response. The time (in ISO-8601 format) at which the first terminal at the business was activated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time" + }, + "address": { + "description": "The main business address.", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "attributes": { + "description": "A name/value pair list that could be persisted and later retreived.", + "$id": "https://godaddy.com/schemas/commerce/business/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "businessUrl": { + "type": "string", + "description": "The url of the business' website.", + "format": "uri", + "maxLength": 1024 + }, + "closedAt": { + "type": "string", + "format": "date-time", + "description": "Details on when the business was closed." + }, + "closingDetails": { + "type": "string", + "description": "Details on why the business was closed." + }, + "closingReason": { + "type": "string", + "description": "The reason why the business was closed.", + "enum": [ + "TERMINATED", + "CHURNED", + "DUPLICATE" + ] + }, + "createdAt": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "Creation time of the business." + }, + "description": { + "type": "string", + "description": "A short description of the business.", + "maxLength": 512 + }, + "doingBusinessAs": { + "type": "string", + "description": "The name the business likes to be known as.", + "maxLength": 128 + }, + "domicileCountry": { + "type": "string", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "description": "A two-character ISO 3166-1 code that identifies the country or region.", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "emailAddress": { + "type": "string", + "description": "The main business email address.", + "maxLength": 512 + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "industryType": { + "type": "string", + "description": "The industry type that this business belongs to. (Retail, Restaurant, Lodging, MOTO etc.)", + "deprecated": true, + "readOnly": true + }, + "legalName": { + "type": "string", + "description": "The legal name of the business.", + "maxLength": 128 + }, + "logoUrl": { + "type": "string", + "description": "The business' main logo url.", + "maxLength": 1024, + "format": "uri" + }, + "mcc": { + "type": "string", + "description": "The merchant category code of the business in ISO 18245:2023 format (Refer https://www.citibank.com/tts/solutions/commercial-cards/assets/docs/govt/Merchant-Category-Codes.pdf)", + "maxLength": 16 + }, + "organizationId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "phone": { + "description": "The main business phone.", + "$id": "https://godaddy.com/schemas/commerce/phone-with-type.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Phone with Type", + "type": "object", + "properties": { + "details": { + "description": "Phone number details", + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "type": { + "description": "Phone type", + "$id": "https://godaddy.com/schemas/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + } + }, + "required": [ + "details" + ] + }, + "scrubbed": { + "type": "boolean", + "description": "Indicates if business information is scrubbed to protect privacy of the merchant.", + "readOnly": true + }, + "sic": { + "type": "string", + "description": "The standard industry code of the business. (https://siccode.com/sic-code-lookup-directory)", + "maxLength": 16 + }, + "status": { + "type": "string", + "enum": [ + "ADDED", + "ACTIVATED", + "LOCKED", + "CLOSED" + ], + "description": "It is set to ADDED as soon as the business is added into the system. Moved to ACTIVATED once the first terminal is activated. It may move to LOCKED if for whatever reason, operations need to be stopped. It is moved to CLOSED if the business is closed for good." + }, + "subscribedBundles": { + "deprecated": true, + "description": "The list of bundles this business has subscribed to.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/business-bundled-features.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bundled Features", + "deprecated": true, + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "featureConfig": { + "description": "Optional configs for each feature in the list.", + "$id": "https://godaddy.com/schemas/commerce/business/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "featureList": { + "description": "List of features the bundle contains.", + "maxItems": 80, + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "description": "Name of bundle.", + "maxLength": 64 + }, + "type": { + "type": "string", + "description": "The type of the bundle." + }, + "updatedAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "description": "This is the base object for the list of features a business/store has subscribed to.", + "required": [ + "featureList", + "id", + "name" + ] + } + }, + "timezone": { + "description": "The timezone that the headquarters belong to.", + "$id": "https://godaddy.com/schemas/common/time-zone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 1, + "maxLength": 127 + }, + "type": { + "type": "string", + "description": "The type of business. Use TEST_MERCHANT to create a business for testing purpose, and MERCHANT otherwise.", + "enum": [ + "MERCHANT", + "TEST_MERCHANT" + ], + "default": "MERCHANT" + }, + "updatedAt": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "Last updated time of the business." + }, + "paymentDetails": { + "description": "Contains payment details used by the business.", + "nullable": true, + "$id": "https://godaddy.com/schemas/commerce/business-payment-details.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Business Payment Details", + "deprecated": true, + "type": "object", + "properties": { + "acquirer": { + "description": "The merchant acquirer to facilitate card payments for this business. This value is required.", + "$id": "https://godaddy.com/schemas/commerce/business-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Business Payment Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "externalMerchantId": { + "type": "string", + "description": "This is the unique identifier assigned by the acquirer to the business. It is a business level MID." + }, + "processor": { + "description": "The payment processor to facilitate payments for this business.", + "$id": "https://godaddy.com/schemas/commerce/business-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Business Payment Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "processorData": { + "description": "The processor related data to be used by the business.", + "$id": "https://godaddy.com/schemas/commerce/business/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "underwritingLevel": { + "type": "string", + "description": "The application level of the business for underwriting.", + "enum": [ + "BASIC", + "FULL" + ], + "maxLength": 16 + } + }, + "required": [ + "acquirer" + ] + }, + "ownerId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "type", + "description", + "doingBusinessAs", + "legalName", + "timezone" + ] + }, + "type": "array" + }, + "totalItems": { + "description": "Total number of Businesses matching the search criteria. Returned only when totalRequired is set to true.", + "type": "integer" + }, + "totalPages": { + "description": "Total number of pages matching the search criteria. Returned only when totalRequired is set to true.", + "type": "integer" + }, + "links": { + "description": "Array of HATEOAS link relations that should be used to navigate across pages of Businesses", + "$id": "https://godaddy.com/schemas/commerce/link.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "type": "array", + "x-auto-generated": true, + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } } }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.business:read"] + "scopes": [ + "commerce.business:read" + ] }, { "operationId": "createBusiness", @@ -107,21 +952,1362 @@ "required": false, "contentType": "application/json", "schema": { - "$ref": "./models/Business.yaml" + "$id": "https://godaddy.com/schemas/commerce/business.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Business", + "description": "Business resource represents a merchant business", + "properties": { + "activeSince": { + "type": "string", + "description": "This is a response only field. It is set internally and returned in response. The time (in ISO-8601 format) at which the first terminal at the business was activated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time" + }, + "address": { + "description": "The main business address.", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "attributes": { + "description": "A name/value pair list that could be persisted and later retreived.", + "$id": "https://godaddy.com/schemas/commerce/business/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "businessUrl": { + "type": "string", + "description": "The url of the business' website.", + "format": "uri", + "maxLength": 1024 + }, + "closedAt": { + "type": "string", + "format": "date-time", + "description": "Details on when the business was closed." + }, + "closingDetails": { + "type": "string", + "description": "Details on why the business was closed." + }, + "closingReason": { + "type": "string", + "description": "The reason why the business was closed.", + "enum": [ + "TERMINATED", + "CHURNED", + "DUPLICATE" + ] + }, + "createdAt": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "Creation time of the business." + }, + "description": { + "type": "string", + "description": "A short description of the business.", + "maxLength": 512 + }, + "doingBusinessAs": { + "type": "string", + "description": "The name the business likes to be known as.", + "maxLength": 128 + }, + "domicileCountry": { + "type": "string", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "description": "A two-character ISO 3166-1 code that identifies the country or region.", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "emailAddress": { + "type": "string", + "description": "The main business email address.", + "maxLength": 512 + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "industryType": { + "type": "string", + "description": "The industry type that this business belongs to. (Retail, Restaurant, Lodging, MOTO etc.)", + "deprecated": true, + "readOnly": true + }, + "legalName": { + "type": "string", + "description": "The legal name of the business.", + "maxLength": 128 + }, + "logoUrl": { + "type": "string", + "description": "The business' main logo url.", + "maxLength": 1024, + "format": "uri" + }, + "mcc": { + "type": "string", + "description": "The merchant category code of the business in ISO 18245:2023 format (Refer https://www.citibank.com/tts/solutions/commercial-cards/assets/docs/govt/Merchant-Category-Codes.pdf)", + "maxLength": 16 + }, + "organizationId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "phone": { + "description": "The main business phone.", + "$id": "https://godaddy.com/schemas/commerce/phone-with-type.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Phone with Type", + "type": "object", + "properties": { + "details": { + "description": "Phone number details", + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "type": { + "description": "Phone type", + "$id": "https://godaddy.com/schemas/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + } + }, + "required": [ + "details" + ] + }, + "scrubbed": { + "type": "boolean", + "description": "Indicates if business information is scrubbed to protect privacy of the merchant.", + "readOnly": true + }, + "sic": { + "type": "string", + "description": "The standard industry code of the business. (https://siccode.com/sic-code-lookup-directory)", + "maxLength": 16 + }, + "status": { + "type": "string", + "enum": [ + "ADDED", + "ACTIVATED", + "LOCKED", + "CLOSED" + ], + "description": "It is set to ADDED as soon as the business is added into the system. Moved to ACTIVATED once the first terminal is activated. It may move to LOCKED if for whatever reason, operations need to be stopped. It is moved to CLOSED if the business is closed for good." + }, + "subscribedBundles": { + "deprecated": true, + "description": "The list of bundles this business has subscribed to.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/business-bundled-features.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bundled Features", + "deprecated": true, + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "featureConfig": { + "description": "Optional configs for each feature in the list.", + "$id": "https://godaddy.com/schemas/commerce/business/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "featureList": { + "description": "List of features the bundle contains.", + "maxItems": 80, + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "description": "Name of bundle.", + "maxLength": 64 + }, + "type": { + "type": "string", + "description": "The type of the bundle." + }, + "updatedAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "description": "This is the base object for the list of features a business/store has subscribed to.", + "required": [ + "featureList", + "id", + "name" + ] + } + }, + "timezone": { + "description": "The timezone that the headquarters belong to.", + "$id": "https://godaddy.com/schemas/common/time-zone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 1, + "maxLength": 127 + }, + "type": { + "type": "string", + "description": "The type of business. Use TEST_MERCHANT to create a business for testing purpose, and MERCHANT otherwise.", + "enum": [ + "MERCHANT", + "TEST_MERCHANT" + ], + "default": "MERCHANT" + }, + "updatedAt": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "Last updated time of the business." + }, + "paymentDetails": { + "description": "Contains payment details used by the business.", + "nullable": true, + "$id": "https://godaddy.com/schemas/commerce/business-payment-details.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Business Payment Details", + "deprecated": true, + "type": "object", + "properties": { + "acquirer": { + "description": "The merchant acquirer to facilitate card payments for this business. This value is required.", + "$id": "https://godaddy.com/schemas/commerce/business-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Business Payment Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "externalMerchantId": { + "type": "string", + "description": "This is the unique identifier assigned by the acquirer to the business. It is a business level MID." + }, + "processor": { + "description": "The payment processor to facilitate payments for this business.", + "$id": "https://godaddy.com/schemas/commerce/business-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Business Payment Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "processorData": { + "description": "The processor related data to be used by the business.", + "$id": "https://godaddy.com/schemas/commerce/business/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "underwritingLevel": { + "type": "string", + "description": "The application level of the business for underwriting.", + "enum": [ + "BASIC", + "FULL" + ], + "maxLength": 16 + } + }, + "required": [ + "acquirer" + ] + }, + "ownerId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "type", + "description", + "doingBusinessAs", + "legalName", + "timezone" + ] } }, "responses": { "200": { "description": "Business Created", "schema": { - "$ref": "./models/Business.yaml" + "$id": "https://godaddy.com/schemas/commerce/business.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Business", + "description": "Business resource represents a merchant business", + "properties": { + "activeSince": { + "type": "string", + "description": "This is a response only field. It is set internally and returned in response. The time (in ISO-8601 format) at which the first terminal at the business was activated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time" + }, + "address": { + "description": "The main business address.", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "attributes": { + "description": "A name/value pair list that could be persisted and later retreived.", + "$id": "https://godaddy.com/schemas/commerce/business/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "businessUrl": { + "type": "string", + "description": "The url of the business' website.", + "format": "uri", + "maxLength": 1024 + }, + "closedAt": { + "type": "string", + "format": "date-time", + "description": "Details on when the business was closed." + }, + "closingDetails": { + "type": "string", + "description": "Details on why the business was closed." + }, + "closingReason": { + "type": "string", + "description": "The reason why the business was closed.", + "enum": [ + "TERMINATED", + "CHURNED", + "DUPLICATE" + ] + }, + "createdAt": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "Creation time of the business." + }, + "description": { + "type": "string", + "description": "A short description of the business.", + "maxLength": 512 + }, + "doingBusinessAs": { + "type": "string", + "description": "The name the business likes to be known as.", + "maxLength": 128 + }, + "domicileCountry": { + "type": "string", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "description": "A two-character ISO 3166-1 code that identifies the country or region.", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "emailAddress": { + "type": "string", + "description": "The main business email address.", + "maxLength": 512 + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "industryType": { + "type": "string", + "description": "The industry type that this business belongs to. (Retail, Restaurant, Lodging, MOTO etc.)", + "deprecated": true, + "readOnly": true + }, + "legalName": { + "type": "string", + "description": "The legal name of the business.", + "maxLength": 128 + }, + "logoUrl": { + "type": "string", + "description": "The business' main logo url.", + "maxLength": 1024, + "format": "uri" + }, + "mcc": { + "type": "string", + "description": "The merchant category code of the business in ISO 18245:2023 format (Refer https://www.citibank.com/tts/solutions/commercial-cards/assets/docs/govt/Merchant-Category-Codes.pdf)", + "maxLength": 16 + }, + "organizationId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "phone": { + "description": "The main business phone.", + "$id": "https://godaddy.com/schemas/commerce/phone-with-type.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Phone with Type", + "type": "object", + "properties": { + "details": { + "description": "Phone number details", + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "type": { + "description": "Phone type", + "$id": "https://godaddy.com/schemas/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + } + }, + "required": [ + "details" + ] + }, + "scrubbed": { + "type": "boolean", + "description": "Indicates if business information is scrubbed to protect privacy of the merchant.", + "readOnly": true + }, + "sic": { + "type": "string", + "description": "The standard industry code of the business. (https://siccode.com/sic-code-lookup-directory)", + "maxLength": 16 + }, + "status": { + "type": "string", + "enum": [ + "ADDED", + "ACTIVATED", + "LOCKED", + "CLOSED" + ], + "description": "It is set to ADDED as soon as the business is added into the system. Moved to ACTIVATED once the first terminal is activated. It may move to LOCKED if for whatever reason, operations need to be stopped. It is moved to CLOSED if the business is closed for good." + }, + "subscribedBundles": { + "deprecated": true, + "description": "The list of bundles this business has subscribed to.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/business-bundled-features.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bundled Features", + "deprecated": true, + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "featureConfig": { + "description": "Optional configs for each feature in the list.", + "$id": "https://godaddy.com/schemas/commerce/business/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "featureList": { + "description": "List of features the bundle contains.", + "maxItems": 80, + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "description": "Name of bundle.", + "maxLength": 64 + }, + "type": { + "type": "string", + "description": "The type of the bundle." + }, + "updatedAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "description": "This is the base object for the list of features a business/store has subscribed to.", + "required": [ + "featureList", + "id", + "name" + ] + } + }, + "timezone": { + "description": "The timezone that the headquarters belong to.", + "$id": "https://godaddy.com/schemas/common/time-zone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 1, + "maxLength": 127 + }, + "type": { + "type": "string", + "description": "The type of business. Use TEST_MERCHANT to create a business for testing purpose, and MERCHANT otherwise.", + "enum": [ + "MERCHANT", + "TEST_MERCHANT" + ], + "default": "MERCHANT" + }, + "updatedAt": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "Last updated time of the business." + }, + "paymentDetails": { + "description": "Contains payment details used by the business.", + "nullable": true, + "$id": "https://godaddy.com/schemas/commerce/business-payment-details.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Business Payment Details", + "deprecated": true, + "type": "object", + "properties": { + "acquirer": { + "description": "The merchant acquirer to facilitate card payments for this business. This value is required.", + "$id": "https://godaddy.com/schemas/commerce/business-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Business Payment Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "externalMerchantId": { + "type": "string", + "description": "This is the unique identifier assigned by the acquirer to the business. It is a business level MID." + }, + "processor": { + "description": "The payment processor to facilitate payments for this business.", + "$id": "https://godaddy.com/schemas/commerce/business-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Business Payment Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "processorData": { + "description": "The processor related data to be used by the business.", + "$id": "https://godaddy.com/schemas/commerce/business/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "underwritingLevel": { + "type": "string", + "description": "The application level of the business for underwriting.", + "enum": [ + "BASIC", + "FULL" + ], + "maxLength": 16 + } + }, + "required": [ + "acquirer" + ] + }, + "ownerId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "type", + "description", + "doingBusinessAs", + "legalName", + "timezone" + ] } }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.business:create"] + "scopes": [ + "commerce.business:create" + ] }, { "operationId": "getBusinessById", @@ -135,7 +2321,11 @@ "in": "path", "required": true, "schema": { - "$ref": "./common-types/v1/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -184,14 +2374,785 @@ "200": { "description": "Business Found", "schema": { - "$ref": "./models/Business.yaml" + "$id": "https://godaddy.com/schemas/commerce/business.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Business", + "description": "Business resource represents a merchant business", + "properties": { + "activeSince": { + "type": "string", + "description": "This is a response only field. It is set internally and returned in response. The time (in ISO-8601 format) at which the first terminal at the business was activated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time" + }, + "address": { + "description": "The main business address.", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "attributes": { + "description": "A name/value pair list that could be persisted and later retreived.", + "$id": "https://godaddy.com/schemas/commerce/business/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "businessUrl": { + "type": "string", + "description": "The url of the business' website.", + "format": "uri", + "maxLength": 1024 + }, + "closedAt": { + "type": "string", + "format": "date-time", + "description": "Details on when the business was closed." + }, + "closingDetails": { + "type": "string", + "description": "Details on why the business was closed." + }, + "closingReason": { + "type": "string", + "description": "The reason why the business was closed.", + "enum": [ + "TERMINATED", + "CHURNED", + "DUPLICATE" + ] + }, + "createdAt": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "Creation time of the business." + }, + "description": { + "type": "string", + "description": "A short description of the business.", + "maxLength": 512 + }, + "doingBusinessAs": { + "type": "string", + "description": "The name the business likes to be known as.", + "maxLength": 128 + }, + "domicileCountry": { + "type": "string", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "description": "A two-character ISO 3166-1 code that identifies the country or region.", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "emailAddress": { + "type": "string", + "description": "The main business email address.", + "maxLength": 512 + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "industryType": { + "type": "string", + "description": "The industry type that this business belongs to. (Retail, Restaurant, Lodging, MOTO etc.)", + "deprecated": true, + "readOnly": true + }, + "legalName": { + "type": "string", + "description": "The legal name of the business.", + "maxLength": 128 + }, + "logoUrl": { + "type": "string", + "description": "The business' main logo url.", + "maxLength": 1024, + "format": "uri" + }, + "mcc": { + "type": "string", + "description": "The merchant category code of the business in ISO 18245:2023 format (Refer https://www.citibank.com/tts/solutions/commercial-cards/assets/docs/govt/Merchant-Category-Codes.pdf)", + "maxLength": 16 + }, + "organizationId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "phone": { + "description": "The main business phone.", + "$id": "https://godaddy.com/schemas/commerce/phone-with-type.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Phone with Type", + "type": "object", + "properties": { + "details": { + "description": "Phone number details", + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "type": { + "description": "Phone type", + "$id": "https://godaddy.com/schemas/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + } + }, + "required": [ + "details" + ] + }, + "scrubbed": { + "type": "boolean", + "description": "Indicates if business information is scrubbed to protect privacy of the merchant.", + "readOnly": true + }, + "sic": { + "type": "string", + "description": "The standard industry code of the business. (https://siccode.com/sic-code-lookup-directory)", + "maxLength": 16 + }, + "status": { + "type": "string", + "enum": [ + "ADDED", + "ACTIVATED", + "LOCKED", + "CLOSED" + ], + "description": "It is set to ADDED as soon as the business is added into the system. Moved to ACTIVATED once the first terminal is activated. It may move to LOCKED if for whatever reason, operations need to be stopped. It is moved to CLOSED if the business is closed for good." + }, + "subscribedBundles": { + "deprecated": true, + "description": "The list of bundles this business has subscribed to.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/business-bundled-features.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bundled Features", + "deprecated": true, + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "featureConfig": { + "description": "Optional configs for each feature in the list.", + "$id": "https://godaddy.com/schemas/commerce/business/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "featureList": { + "description": "List of features the bundle contains.", + "maxItems": 80, + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "description": "Name of bundle.", + "maxLength": 64 + }, + "type": { + "type": "string", + "description": "The type of the bundle." + }, + "updatedAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "description": "This is the base object for the list of features a business/store has subscribed to.", + "required": [ + "featureList", + "id", + "name" + ] + } + }, + "timezone": { + "description": "The timezone that the headquarters belong to.", + "$id": "https://godaddy.com/schemas/common/time-zone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 1, + "maxLength": 127 + }, + "type": { + "type": "string", + "description": "The type of business. Use TEST_MERCHANT to create a business for testing purpose, and MERCHANT otherwise.", + "enum": [ + "MERCHANT", + "TEST_MERCHANT" + ], + "default": "MERCHANT" + }, + "updatedAt": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "Last updated time of the business." + }, + "paymentDetails": { + "description": "Contains payment details used by the business.", + "nullable": true, + "$id": "https://godaddy.com/schemas/commerce/business-payment-details.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Business Payment Details", + "deprecated": true, + "type": "object", + "properties": { + "acquirer": { + "description": "The merchant acquirer to facilitate card payments for this business. This value is required.", + "$id": "https://godaddy.com/schemas/commerce/business-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Business Payment Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "externalMerchantId": { + "type": "string", + "description": "This is the unique identifier assigned by the acquirer to the business. It is a business level MID." + }, + "processor": { + "description": "The payment processor to facilitate payments for this business.", + "$id": "https://godaddy.com/schemas/commerce/business-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Business Payment Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "processorData": { + "description": "The processor related data to be used by the business.", + "$id": "https://godaddy.com/schemas/commerce/business/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "underwritingLevel": { + "type": "string", + "description": "The application level of the business for underwriting.", + "enum": [ + "BASIC", + "FULL" + ], + "maxLength": 16 + } + }, + "required": [ + "acquirer" + ] + }, + "ownerId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "type", + "description", + "doingBusinessAs", + "legalName", + "timezone" + ] } }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.business:read"] + "scopes": [ + "commerce.business:read" + ] }, { "operationId": "patchBusiness", @@ -205,7 +3166,11 @@ "in": "path", "required": true, "schema": { - "$ref": "./common-types/v1/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -255,7 +3220,68 @@ "contentType": "application/json", "schema": { "items": { - "$ref": "./common-types/v1/patch-request.json" + "$id": "https://godaddy.com/schemas/common/patch-request.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "title": "Patch Request", + "description": "An array of JSON patch objects to apply partial updates to resources.", + "items": { + "$id": "https://godaddy.com/schemas/common/patch.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Patch", + "description": "The JSON patch object to apply partial updates to resources.", + "properties": { + "op": { + "type": "string", + "description": "The operation to complete.", + "enum": [ + "add", + "remove", + "replace", + "move", + "copy", + "test" + ] + }, + "path": { + "type": "string", + "description": "The JSON pointer to the target document location at which to complete the operation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ], + "nullable": true, + "description": "The value to apply. The `remove` operation does not require a value." + }, + "from": { + "type": "string", + "description": "The JSON pointer to the target document location from which to move the value. Required for the `move` operation." + } + }, + "required": [ + "op" + ] + } }, "type": "array" } @@ -264,17 +3290,788 @@ "200": { "description": "Business updated", "schema": { - "$ref": "./models/Business.yaml" + "$id": "https://godaddy.com/schemas/commerce/business.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Business", + "description": "Business resource represents a merchant business", + "properties": { + "activeSince": { + "type": "string", + "description": "This is a response only field. It is set internally and returned in response. The time (in ISO-8601 format) at which the first terminal at the business was activated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time" + }, + "address": { + "description": "The main business address.", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "attributes": { + "description": "A name/value pair list that could be persisted and later retreived.", + "$id": "https://godaddy.com/schemas/commerce/business/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "businessUrl": { + "type": "string", + "description": "The url of the business' website.", + "format": "uri", + "maxLength": 1024 + }, + "closedAt": { + "type": "string", + "format": "date-time", + "description": "Details on when the business was closed." + }, + "closingDetails": { + "type": "string", + "description": "Details on why the business was closed." + }, + "closingReason": { + "type": "string", + "description": "The reason why the business was closed.", + "enum": [ + "TERMINATED", + "CHURNED", + "DUPLICATE" + ] + }, + "createdAt": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "Creation time of the business." + }, + "description": { + "type": "string", + "description": "A short description of the business.", + "maxLength": 512 + }, + "doingBusinessAs": { + "type": "string", + "description": "The name the business likes to be known as.", + "maxLength": 128 + }, + "domicileCountry": { + "type": "string", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "description": "A two-character ISO 3166-1 code that identifies the country or region.", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "emailAddress": { + "type": "string", + "description": "The main business email address.", + "maxLength": 512 + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "industryType": { + "type": "string", + "description": "The industry type that this business belongs to. (Retail, Restaurant, Lodging, MOTO etc.)", + "deprecated": true, + "readOnly": true + }, + "legalName": { + "type": "string", + "description": "The legal name of the business.", + "maxLength": 128 + }, + "logoUrl": { + "type": "string", + "description": "The business' main logo url.", + "maxLength": 1024, + "format": "uri" + }, + "mcc": { + "type": "string", + "description": "The merchant category code of the business in ISO 18245:2023 format (Refer https://www.citibank.com/tts/solutions/commercial-cards/assets/docs/govt/Merchant-Category-Codes.pdf)", + "maxLength": 16 + }, + "organizationId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "phone": { + "description": "The main business phone.", + "$id": "https://godaddy.com/schemas/commerce/phone-with-type.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Phone with Type", + "type": "object", + "properties": { + "details": { + "description": "Phone number details", + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "type": { + "description": "Phone type", + "$id": "https://godaddy.com/schemas/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + } + }, + "required": [ + "details" + ] + }, + "scrubbed": { + "type": "boolean", + "description": "Indicates if business information is scrubbed to protect privacy of the merchant.", + "readOnly": true + }, + "sic": { + "type": "string", + "description": "The standard industry code of the business. (https://siccode.com/sic-code-lookup-directory)", + "maxLength": 16 + }, + "status": { + "type": "string", + "enum": [ + "ADDED", + "ACTIVATED", + "LOCKED", + "CLOSED" + ], + "description": "It is set to ADDED as soon as the business is added into the system. Moved to ACTIVATED once the first terminal is activated. It may move to LOCKED if for whatever reason, operations need to be stopped. It is moved to CLOSED if the business is closed for good." + }, + "subscribedBundles": { + "deprecated": true, + "description": "The list of bundles this business has subscribed to.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/business-bundled-features.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bundled Features", + "deprecated": true, + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "featureConfig": { + "description": "Optional configs for each feature in the list.", + "$id": "https://godaddy.com/schemas/commerce/business/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "featureList": { + "description": "List of features the bundle contains.", + "maxItems": 80, + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "description": "Name of bundle.", + "maxLength": 64 + }, + "type": { + "type": "string", + "description": "The type of the bundle." + }, + "updatedAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "description": "This is the base object for the list of features a business/store has subscribed to.", + "required": [ + "featureList", + "id", + "name" + ] + } + }, + "timezone": { + "description": "The timezone that the headquarters belong to.", + "$id": "https://godaddy.com/schemas/common/time-zone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 1, + "maxLength": 127 + }, + "type": { + "type": "string", + "description": "The type of business. Use TEST_MERCHANT to create a business for testing purpose, and MERCHANT otherwise.", + "enum": [ + "MERCHANT", + "TEST_MERCHANT" + ], + "default": "MERCHANT" + }, + "updatedAt": { + "type": "string", + "readOnly": true, + "format": "date-time", + "description": "Last updated time of the business." + }, + "paymentDetails": { + "description": "Contains payment details used by the business.", + "nullable": true, + "$id": "https://godaddy.com/schemas/commerce/business-payment-details.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Business Payment Details", + "deprecated": true, + "type": "object", + "properties": { + "acquirer": { + "description": "The merchant acquirer to facilitate card payments for this business. This value is required.", + "$id": "https://godaddy.com/schemas/commerce/business-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Business Payment Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "externalMerchantId": { + "type": "string", + "description": "This is the unique identifier assigned by the acquirer to the business. It is a business level MID." + }, + "processor": { + "description": "The payment processor to facilitate payments for this business.", + "$id": "https://godaddy.com/schemas/commerce/business-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Business Payment Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "processorData": { + "description": "The processor related data to be used by the business.", + "$id": "https://godaddy.com/schemas/commerce/business/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "underwritingLevel": { + "type": "string", + "description": "The application level of the business for underwriting.", + "enum": [ + "BASIC", + "FULL" + ], + "maxLength": 16 + } + }, + "required": [ + "acquirer" + ] + }, + "ownerId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "type", + "description", + "doingBusinessAs", + "legalName", + "timezone" + ] } }, "404": { "description": "Business Not Found" }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.channels:write"] + "scopes": [ + "commerce.channels:write" + ] }, { "operationId": "getBusinessAttributes", @@ -288,7 +4085,11 @@ "in": "path", "required": true, "schema": { - "$ref": "./common-types/v1/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -306,14 +4107,225 @@ "200": { "description": "Business Attributes Found", "schema": { - "$ref": "./types/Dictionary.yaml" + "$id": "https://godaddy.com/schemas/commerce/business/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "description": "Key value pairs of strings", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } } }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.business:read"] + "scopes": [ + "commerce.business:read" + ] }, { "operationId": "updateBusinessAttribute", @@ -337,7 +4349,11 @@ "in": "path", "required": true, "schema": { - "$ref": "./common-types/v1/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -354,7 +4370,19 @@ "required": false, "contentType": "application/json", "schema": { - "$ref": "#/components/schemas/attributeUpdateRequest" + "properties": { + "value": { + "type": "string", + "description": "The attribute value." + }, + "ttl": { + "type": "integer", + "description": "The expiration time of an ephemeral attribute." + } + }, + "required": [ + "value" + ] } }, "responses": { @@ -362,13 +4390,413 @@ "description": "Business Attribute updated" }, "404": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.business:update"] + "scopes": [ + "commerce.business:update" + ] }, { "operationId": "getBusinessAttribute", @@ -392,7 +4820,11 @@ "in": "path", "required": true, "schema": { - "$ref": "./common-types/v1/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -410,13 +4842,413 @@ "description": "Business Attribute Found" }, "404": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.business:read"] + "scopes": [ + "commerce.business:read" + ] }, { "operationId": "deleteBusinessAttribute", @@ -440,7 +5272,11 @@ "in": "path", "required": true, "schema": { - "$ref": "./common-types/v1/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -467,13 +5303,413 @@ "description": "Business Attribute Deleted" }, "404": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.business:update"] + "scopes": [ + "commerce.business:update" + ] } ] -} +} \ No newline at end of file diff --git a/src/cli/schemas/api/catalog-products.json b/src/cli/schemas/api/catalog-products.json index 0f01edc..8d14f16 100644 --- a/src/cli/schemas/api/catalog-products.json +++ b/src/cli/schemas/api/catalog-products.json @@ -16,6 +16,9 @@ "in": "path", "required": true, "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", "type": "string", "format": "uuid" } @@ -26,6 +29,9 @@ "required": true, "description": "Store ID header required by catalog subgraph", "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", "type": "string", "format": "uuid" } @@ -36,7 +42,9 @@ "contentType": "application/json", "schema": { "type": "object", - "required": ["query"], + "required": [ + "query" + ], "properties": { "query": { "type": "string" @@ -88,10 +96,13 @@ "description": "Internal server error" } }, - "scopes": ["commerce.product:read", "commerce.product:write"], + "scopes": [ + "commerce.product:read", + "commerce.product:write" + ], "graphql": { "schemaRef": "./graphql/schema.graphql", - "operationCount": 145, + "operationCount": 149, "operations": [ { "name": "attribute", @@ -265,6 +276,56 @@ } ] }, + { + "name": "inventoryAdjustmentReasons", + "kind": "query", + "returnType": "InventoryAdjustmentReasonConnection", + "description": "List inventory adjustment reasons available to the current store. Includes both store-scoped and global preset reasons.", + "deprecated": false, + "args": [ + { + "name": "after", + "type": "String", + "required": false + }, + { + "name": "before", + "type": "String", + "required": false + }, + { + "name": "first", + "type": "Int", + "required": false + }, + { + "name": "last", + "type": "Int", + "required": false + }, + { + "name": "name", + "type": "NameFilter", + "required": false + }, + { + "name": "orderBy", + "type": "InventoryAdjustmentReasonOrderBy", + "required": false + }, + { + "name": "paginationType", + "type": "PaginationType", + "required": false, + "defaultValue": "CURSOR" + }, + { + "name": "status", + "type": "InventoryAdjustmentReasonStatusFilter", + "required": false + } + ] + }, { "name": "inventoryAdjustments", "kind": "query", @@ -1837,6 +1898,20 @@ } ] }, + { + "name": "archiveInventoryAdjustmentReason", + "kind": "mutation", + "returnType": "InventoryAdjustmentReason", + "description": "Archive a store-scoped inventory adjustment reason. Global reasons cannot be archived.", + "deprecated": false, + "args": [ + { + "name": "input", + "type": "MutationArchiveInventoryAdjustmentReasonInput!", + "required": true + } + ] + }, { "name": "archiveList", "kind": "mutation", @@ -2007,6 +2082,20 @@ } ] }, + { + "name": "createInventoryAdjustmentReason", + "kind": "mutation", + "returnType": "InventoryAdjustmentReason", + "description": "Create a new store-scoped inventory adjustment reason. Name must be kebab-case and must not start with \"g-\" (reserved for global presets). Once created, the name is immutable.", + "deprecated": false, + "args": [ + { + "name": "input", + "type": "MutationCreateInventoryAdjustmentReasonInput!", + "required": true + } + ] + }, { "name": "createList", "kind": "mutation", @@ -3059,6 +3148,20 @@ } ] }, + { + "name": "updateInventoryAdjustmentReason", + "kind": "mutation", + "returnType": "InventoryAdjustmentReason", + "description": "Update the label of a store-scoped inventory adjustment reason. Global preset reasons cannot be updated.", + "deprecated": false, + "args": [ + { + "name": "input", + "type": "MutationUpdateInventoryAdjustmentReasonInput!", + "required": true + } + ] + }, { "name": "updateList", "kind": "mutation", @@ -3389,4 +3492,4 @@ } } ] -} +} \ No newline at end of file diff --git a/src/cli/schemas/api/channels.json b/src/cli/schemas/api/channels.json index 4fa4179..7042144 100644 --- a/src/cli/schemas/api/channels.json +++ b/src/cli/schemas/api/channels.json @@ -14,18 +14,3418 @@ "required": false, "contentType": "application/json", "schema": { - "$ref": "./models/Channel.yaml" + "$id": "https://godaddy.com/schemas/commerce/channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Channel", + "type": "object", + "description": "Resource representing the Channel", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/retail-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Retail Channel", + "type": "object", + "description": "Resource representing a Retail Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ], + "properties": { + "location": { + "description": "Location details of the retail channel", + "$id": "https://godaddy.com/schemas/commerce/retail-channel-location.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Retail Location", + "type": "object", + "$defs": { + "RetailLocationContact": { + "type": "object", + "title": "Retail Location Contact", + "properties": { + "type": { + "description": "Type of the contact phone", + "$id": "https://godaddy.com/schema/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + }, + "phone": { + "description": "Phone number details", + "$id": "https://godaddy.com/schema/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + } + } + } + }, + "properties": { + "alias": { + "type": "string", + "maxLength": 128, + "description": "Alias for the location" + }, + "address": { + "description": "Physical address of the retail location", + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "contacts": { + "type": "array", + "description": "Contact details of the location", + "items": { + "type": "object", + "title": "Retail Location Contact", + "properties": { + "type": { + "description": "Type of the contact phone", + "$id": "https://godaddy.com/schema/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + }, + "phone": { + "description": "Phone number details", + "$id": "https://godaddy.com/schema/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + } + } + } + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/online-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Online Channel", + "type": "object", + "description": "Resource representing the Online Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/mobile-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Mobile Channel", + "type": "object", + "description": "Resource representing the Mobile Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/marketplace-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Marketplace Channel", + "type": "object", + "description": "Resource representing the Marketplace Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/social-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Social Channel", + "type": "object", + "description": "Resource representing the Social Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "ONLINE": "./OnlineChannel.yaml", + "RETAIL": "./RetailChannel.yaml", + "MOBILE": "./MobileChannel.yaml", + "MARKETPLACE": "./MarketplaceChannel.yaml", + "SOCIAL": "./SocialChannel.yaml", + "DEFAULT": "./BasicChannel.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Channel type should be one of ('RETAIL','ONLINE','MOBILE','MARKETPLACE','SOCIAL','DEFAULT')" + } + }, + "required": [ + "type" + ] } }, "responses": { "201": { "description": "New resource created successfully", "schema": { - "$ref": "./models/Channel.yaml" + "$id": "https://godaddy.com/schemas/commerce/channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Channel", + "type": "object", + "description": "Resource representing the Channel", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/retail-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Retail Channel", + "type": "object", + "description": "Resource representing a Retail Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ], + "properties": { + "location": { + "description": "Location details of the retail channel", + "$id": "https://godaddy.com/schemas/commerce/retail-channel-location.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Retail Location", + "type": "object", + "$defs": { + "RetailLocationContact": { + "type": "object", + "title": "Retail Location Contact", + "properties": { + "type": { + "description": "Type of the contact phone", + "$id": "https://godaddy.com/schema/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + }, + "phone": { + "description": "Phone number details", + "$id": "https://godaddy.com/schema/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + } + } + } + }, + "properties": { + "alias": { + "type": "string", + "maxLength": 128, + "description": "Alias for the location" + }, + "address": { + "description": "Physical address of the retail location", + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "contacts": { + "type": "array", + "description": "Contact details of the location", + "items": { + "type": "object", + "title": "Retail Location Contact", + "properties": { + "type": { + "description": "Type of the contact phone", + "$id": "https://godaddy.com/schema/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + }, + "phone": { + "description": "Phone number details", + "$id": "https://godaddy.com/schema/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + } + } + } + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/online-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Online Channel", + "type": "object", + "description": "Resource representing the Online Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/mobile-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Mobile Channel", + "type": "object", + "description": "Resource representing the Mobile Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/marketplace-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Marketplace Channel", + "type": "object", + "description": "Resource representing the Marketplace Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/social-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Social Channel", + "type": "object", + "description": "Resource representing the Social Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "ONLINE": "./OnlineChannel.yaml", + "RETAIL": "./RetailChannel.yaml", + "MOBILE": "./MobileChannel.yaml", + "MARKETPLACE": "./MarketplaceChannel.yaml", + "SOCIAL": "./SocialChannel.yaml", + "DEFAULT": "./BasicChannel.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Channel type should be one of ('RETAIL','ONLINE','MOBILE','MARKETPLACE','SOCIAL','DEFAULT')" + } + }, + "required": [ + "type" + ] } } }, - "scopes": ["commerce.channel:create"] + "scopes": [ + "commerce.channel:create" + ] }, { "operationId": "getChannels", @@ -47,7 +3447,14 @@ "in": "query", "required": false, "schema": { - "$ref": "./types/Id.yaml" + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "unique identifier", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" } }, { @@ -93,11 +3500,1784 @@ "200": { "description": "Channels", "schema": { - "$ref": "./models/ChannelList.yaml" + "$id": "https://godaddy.com/schemas/commerce/channel-list.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelList", + "type": "object", + "description": "Resource representing a list of Channels", + "properties": { + "items": { + "description": "Array containing the current page of Channels", + "items": { + "$id": "https://godaddy.com/schemas/commerce/channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Channel", + "type": "object", + "description": "Resource representing the Channel", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/retail-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Retail Channel", + "type": "object", + "description": "Resource representing a Retail Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ], + "properties": { + "location": { + "description": "Location details of the retail channel", + "$id": "https://godaddy.com/schemas/commerce/retail-channel-location.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Retail Location", + "type": "object", + "$defs": { + "RetailLocationContact": { + "type": "object", + "title": "Retail Location Contact", + "properties": { + "type": { + "description": "Type of the contact phone", + "$id": "https://godaddy.com/schema/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + }, + "phone": { + "description": "Phone number details", + "$id": "https://godaddy.com/schema/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + } + } + } + }, + "properties": { + "alias": { + "type": "string", + "maxLength": 128, + "description": "Alias for the location" + }, + "address": { + "description": "Physical address of the retail location", + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "contacts": { + "type": "array", + "description": "Contact details of the location", + "items": { + "type": "object", + "title": "Retail Location Contact", + "properties": { + "type": { + "description": "Type of the contact phone", + "$id": "https://godaddy.com/schema/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + }, + "phone": { + "description": "Phone number details", + "$id": "https://godaddy.com/schema/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + } + } + } + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/online-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Online Channel", + "type": "object", + "description": "Resource representing the Online Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/mobile-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Mobile Channel", + "type": "object", + "description": "Resource representing the Mobile Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/marketplace-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Marketplace Channel", + "type": "object", + "description": "Resource representing the Marketplace Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/social-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Social Channel", + "type": "object", + "description": "Resource representing the Social Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "ONLINE": "./OnlineChannel.yaml", + "RETAIL": "./RetailChannel.yaml", + "MOBILE": "./MobileChannel.yaml", + "MARKETPLACE": "./MarketplaceChannel.yaml", + "SOCIAL": "./SocialChannel.yaml", + "DEFAULT": "./BasicChannel.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Channel type should be one of ('RETAIL','ONLINE','MOBILE','MARKETPLACE','SOCIAL','DEFAULT')" + } + }, + "required": [ + "type" + ] + }, + "type": "array" + }, + "totalItems": { + "description": "Total number of Channels matching the search criteria. Returned only when totalRequired is set to true.", + "type": "integer" + }, + "totalPages": { + "description": "Total number of pages matching the search criteria. Returned only when totalRequired is set to true.", + "type": "integer" + }, + "links": { + "description": "Array of HATEOAS link relations that should be used to navigate across pages of Channels", + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } } } }, - "scopes": ["commerce.channel:read"] + "scopes": [ + "commerce.channel:read" + ] }, { "operationId": "patchChannel", @@ -111,7 +5291,14 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Id.yaml" + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "unique identifier", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" } } ], @@ -120,7 +5307,92 @@ "contentType": "application/json", "schema": { "items": { - "$ref": "./types/JsonPatch.yaml" + "$id": "https://godaddy.com/schemas/json-patch.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "JsonPatch", + "type": "array", + "definitions": { + "path": { + "description": "A JSON Pointer path.", + "type": "string" + } + }, + "items": { + "oneOf": [ + { + "additionalProperties": false, + "required": [ + "value", + "op", + "path" + ], + "properties": { + "path": { + "description": "A JSON Pointer path.", + "type": "string" + }, + "op": { + "description": "The operation to perform.", + "type": "string", + "enum": [ + "add", + "replace", + "test" + ] + }, + "value": { + "description": "The value to add, replace or test." + } + } + }, + { + "additionalProperties": false, + "required": [ + "op", + "path" + ], + "properties": { + "path": { + "description": "A JSON Pointer path.", + "type": "string" + }, + "op": { + "description": "The operation to perform.", + "type": "string", + "enum": [ + "remove" + ] + } + } + }, + { + "additionalProperties": false, + "required": [ + "from", + "op", + "path" + ], + "properties": { + "path": { + "description": "A JSON Pointer path.", + "type": "string" + }, + "op": { + "description": "The operation to perform.", + "type": "string", + "enum": [ + "move", + "copy" + ] + }, + "from": { + "description": "A JSON Pointer path.", + "type": "string" + } + } + } + ] + } }, "type": "array" } @@ -129,14 +5401,1715 @@ "200": { "description": "Channel updated", "schema": { - "$ref": "./models/Channel.yaml" + "$id": "https://godaddy.com/schemas/commerce/channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Channel", + "type": "object", + "description": "Resource representing the Channel", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/retail-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Retail Channel", + "type": "object", + "description": "Resource representing a Retail Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ], + "properties": { + "location": { + "description": "Location details of the retail channel", + "$id": "https://godaddy.com/schemas/commerce/retail-channel-location.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Retail Location", + "type": "object", + "$defs": { + "RetailLocationContact": { + "type": "object", + "title": "Retail Location Contact", + "properties": { + "type": { + "description": "Type of the contact phone", + "$id": "https://godaddy.com/schema/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + }, + "phone": { + "description": "Phone number details", + "$id": "https://godaddy.com/schema/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + } + } + } + }, + "properties": { + "alias": { + "type": "string", + "maxLength": 128, + "description": "Alias for the location" + }, + "address": { + "description": "Physical address of the retail location", + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "contacts": { + "type": "array", + "description": "Contact details of the location", + "items": { + "type": "object", + "title": "Retail Location Contact", + "properties": { + "type": { + "description": "Type of the contact phone", + "$id": "https://godaddy.com/schema/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + }, + "phone": { + "description": "Phone number details", + "$id": "https://godaddy.com/schema/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + } + } + } + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/online-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Online Channel", + "type": "object", + "description": "Resource representing the Online Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/mobile-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Mobile Channel", + "type": "object", + "description": "Resource representing the Mobile Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/marketplace-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Marketplace Channel", + "type": "object", + "description": "Resource representing the Marketplace Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/social-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Social Channel", + "type": "object", + "description": "Resource representing the Social Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "ONLINE": "./OnlineChannel.yaml", + "RETAIL": "./RetailChannel.yaml", + "MOBILE": "./MobileChannel.yaml", + "MARKETPLACE": "./MarketplaceChannel.yaml", + "SOCIAL": "./SocialChannel.yaml", + "DEFAULT": "./BasicChannel.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Channel type should be one of ('RETAIL','ONLINE','MOBILE','MARKETPLACE','SOCIAL','DEFAULT')" + } + }, + "required": [ + "type" + ] } }, "404": { "description": "Channel Not Found" } }, - "scopes": ["commerce.channel:update"] + "scopes": [ + "commerce.channel:update" + ] }, { "operationId": "getChannelById", @@ -150,7 +7123,14 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Id.yaml" + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "unique identifier", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" } } ], @@ -158,14 +7138,1715 @@ "200": { "description": "Channel Found", "schema": { - "$ref": "./models/Channel.yaml" + "$id": "https://godaddy.com/schemas/commerce/channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Channel", + "type": "object", + "description": "Resource representing the Channel", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/retail-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Retail Channel", + "type": "object", + "description": "Resource representing a Retail Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ], + "properties": { + "location": { + "description": "Location details of the retail channel", + "$id": "https://godaddy.com/schemas/commerce/retail-channel-location.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Retail Location", + "type": "object", + "$defs": { + "RetailLocationContact": { + "type": "object", + "title": "Retail Location Contact", + "properties": { + "type": { + "description": "Type of the contact phone", + "$id": "https://godaddy.com/schema/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + }, + "phone": { + "description": "Phone number details", + "$id": "https://godaddy.com/schema/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + } + } + } + }, + "properties": { + "alias": { + "type": "string", + "maxLength": 128, + "description": "Alias for the location" + }, + "address": { + "description": "Physical address of the retail location", + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "contacts": { + "type": "array", + "description": "Contact details of the location", + "items": { + "type": "object", + "title": "Retail Location Contact", + "properties": { + "type": { + "description": "Type of the contact phone", + "$id": "https://godaddy.com/schema/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + }, + "phone": { + "description": "Phone number details", + "$id": "https://godaddy.com/schema/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + } + } + } + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/online-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Online Channel", + "type": "object", + "description": "Resource representing the Online Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/mobile-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Mobile Channel", + "type": "object", + "description": "Resource representing the Mobile Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/marketplace-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Marketplace Channel", + "type": "object", + "description": "Resource representing the Marketplace Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/social-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Social Channel", + "type": "object", + "description": "Resource representing the Social Channel", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/basic-channel.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Basic Channel", + "type": "object", + "description": "Resource representing the Basic Channel", + "properties": { + "channelId": { + "description": "Globally unique Id of the channel that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel", + "maxLength": 128 + }, + "channelProviderId": { + "description": "Identifier of the channel provider (defaulted based on the caller's auth credentials)", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "externalChannelId": { + "type": "string", + "description": "External identifier of the channel", + "maxLength": 64 + }, + "subType": { + "type": "string", + "description": "Additional information that represents the type of the channel", + "maxLength": 256 + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelStatus", + "type": "string", + "description": "Channel Status", + "enum": [ + "PENDING_SETUP", + "ACTIVE", + "INACTIVE", + "ERROR", + "REMOVED" + ], + "default": "ACTIVE" + }, + "registeredStores": { + "description": "List of stores that are registered to this channel", + "items": { + "$id": "https://godaddy.com/schemas/commerce/registered-store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStore", + "type": "object", + "description": "Resource representing Store registration with Channel", + "properties": { + "storeId": { + "description": "Id of the store that can be used to reference", + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "status": { + "description": "Status of the registration", + "$id": "https://godaddy.com/schemas/commerce/registered-store-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RegisteredStoreStatus", + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ], + "default": "ENABLED" + }, + "default": { + "type": "boolean", + "description": "If this is a default channel for the store", + "default": false + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "storeId" + ] + }, + "type": "array" + }, + "links": { + "description": "Links pointing to external resource", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "createdAt": { + "description": "The date and time the channel was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the channel was updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name" + ] + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "ONLINE": "./OnlineChannel.yaml", + "RETAIL": "./RetailChannel.yaml", + "MOBILE": "./MobileChannel.yaml", + "MARKETPLACE": "./MarketplaceChannel.yaml", + "SOCIAL": "./SocialChannel.yaml", + "DEFAULT": "./BasicChannel.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Channel type should be one of ('RETAIL','ONLINE','MOBILE','MARKETPLACE','SOCIAL','DEFAULT')" + } + }, + "required": [ + "type" + ] } }, "404": { "description": "Channel Not Found" } }, - "scopes": ["commerce.channel:read"] + "scopes": [ + "commerce.channel:read" + ] }, { "operationId": "createChannelProvider", @@ -176,18 +8857,132 @@ "required": false, "contentType": "application/json", "schema": { - "$ref": "./models/ChannelProvider.yaml" + "$id": "https://godaddy.com/schemas/commerce/channel-provider.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelProvider", + "type": "object", + "description": "Resource representing the Channel Provider", + "properties": { + "channelProviderId": { + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "unique identifier", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel provider", + "maxLength": 128 + }, + "supportedChannelTypes": { + "type": "array", + "description": "Channel types supported by provider", + "items": { + "$id": "https://godaddy.com/schemas/commerce/channel-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelType", + "type": "string", + "description": "ChannelType", + "enum": [ + "RETAIL", + "ONLINE", + "MOBILE", + "MARKETPLACE", + "SOCIAL", + "DEFAULT" + ] + } + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-provider-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelProviderStatus", + "type": "string", + "enum": [ + "ACTIVE", + "SUSPENDED", + "TERMINATED" + ], + "description": "Channel Provider Status", + "default": "ACTIVE" + } + }, + "required": [ + "name" + ] } }, "responses": { "201": { "description": "New resource created successfully", "schema": { - "$ref": "./models/ChannelProvider.yaml" + "$id": "https://godaddy.com/schemas/commerce/channel-provider.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelProvider", + "type": "object", + "description": "Resource representing the Channel Provider", + "properties": { + "channelProviderId": { + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "unique identifier", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel provider", + "maxLength": 128 + }, + "supportedChannelTypes": { + "type": "array", + "description": "Channel types supported by provider", + "items": { + "$id": "https://godaddy.com/schemas/commerce/channel-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelType", + "type": "string", + "description": "ChannelType", + "enum": [ + "RETAIL", + "ONLINE", + "MOBILE", + "MARKETPLACE", + "SOCIAL", + "DEFAULT" + ] + } + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-provider-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelProviderStatus", + "type": "string", + "enum": [ + "ACTIVE", + "SUSPENDED", + "TERMINATED" + ], + "description": "Channel Provider Status", + "default": "ACTIVE" + } + }, + "required": [ + "name" + ] } } }, - "scopes": ["commerce.channel-provider:create"] + "scopes": [ + "commerce.channel-provider:create" + ] }, { "operationId": "getChannelProviders", @@ -229,11 +9024,141 @@ "200": { "description": "Channel Providers", "schema": { - "$ref": "./models/ChannelProviderList.yaml" + "$id": "https://godaddy.com/schemas/commerce/channel-provider-list.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelProviderList", + "type": "object", + "description": "Resource representing list of Channel Providers", + "properties": { + "items": { + "description": "Array containing the current page of Channel Providers", + "items": { + "$id": "https://godaddy.com/schemas/commerce/channel-provider.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelProvider", + "type": "object", + "description": "Resource representing the Channel Provider", + "properties": { + "channelProviderId": { + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "unique identifier", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel provider", + "maxLength": 128 + }, + "supportedChannelTypes": { + "type": "array", + "description": "Channel types supported by provider", + "items": { + "$id": "https://godaddy.com/schemas/commerce/channel-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelType", + "type": "string", + "description": "ChannelType", + "enum": [ + "RETAIL", + "ONLINE", + "MOBILE", + "MARKETPLACE", + "SOCIAL", + "DEFAULT" + ] + } + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-provider-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelProviderStatus", + "type": "string", + "enum": [ + "ACTIVE", + "SUSPENDED", + "TERMINATED" + ], + "description": "Channel Provider Status", + "default": "ACTIVE" + } + }, + "required": [ + "name" + ] + }, + "type": "array" + }, + "totalItems": { + "description": "Total number of Channel Providers matching the search criteria. Returned only when totalRequired is set to true.", + "type": "integer" + }, + "totalPages": { + "description": "Total number of pages matching the search criteria. Returned only when totalRequired is set to true.", + "type": "integer" + }, + "links": { + "description": "Array of HATEOAS link relations that should be used to navigate across pages of Channel providers", + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } } } }, - "scopes": ["commerce.channel-provider:read"] + "scopes": [ + "commerce.channel-provider:read" + ] }, { "operationId": "patchChannelProvider", @@ -246,7 +9171,14 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Id.yaml" + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "unique identifier", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" } } ], @@ -255,7 +9187,92 @@ "contentType": "application/json", "schema": { "items": { - "$ref": "./types/JsonPatch.yaml" + "$id": "https://godaddy.com/schemas/json-patch.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "JsonPatch", + "type": "array", + "definitions": { + "path": { + "description": "A JSON Pointer path.", + "type": "string" + } + }, + "items": { + "oneOf": [ + { + "additionalProperties": false, + "required": [ + "value", + "op", + "path" + ], + "properties": { + "path": { + "description": "A JSON Pointer path.", + "type": "string" + }, + "op": { + "description": "The operation to perform.", + "type": "string", + "enum": [ + "add", + "replace", + "test" + ] + }, + "value": { + "description": "The value to add, replace or test." + } + } + }, + { + "additionalProperties": false, + "required": [ + "op", + "path" + ], + "properties": { + "path": { + "description": "A JSON Pointer path.", + "type": "string" + }, + "op": { + "description": "The operation to perform.", + "type": "string", + "enum": [ + "remove" + ] + } + } + }, + { + "additionalProperties": false, + "required": [ + "from", + "op", + "path" + ], + "properties": { + "path": { + "description": "A JSON Pointer path.", + "type": "string" + }, + "op": { + "description": "The operation to perform.", + "type": "string", + "enum": [ + "move", + "copy" + ] + }, + "from": { + "description": "A JSON Pointer path.", + "type": "string" + } + } + } + ] + } }, "type": "array" } @@ -264,14 +9281,72 @@ "200": { "description": "Channel Provider updated", "schema": { - "$ref": "./models/ChannelProvider.yaml" + "$id": "https://godaddy.com/schemas/commerce/channel-provider.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelProvider", + "type": "object", + "description": "Resource representing the Channel Provider", + "properties": { + "channelProviderId": { + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "unique identifier", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel provider", + "maxLength": 128 + }, + "supportedChannelTypes": { + "type": "array", + "description": "Channel types supported by provider", + "items": { + "$id": "https://godaddy.com/schemas/commerce/channel-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelType", + "type": "string", + "description": "ChannelType", + "enum": [ + "RETAIL", + "ONLINE", + "MOBILE", + "MARKETPLACE", + "SOCIAL", + "DEFAULT" + ] + } + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-provider-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelProviderStatus", + "type": "string", + "enum": [ + "ACTIVE", + "SUSPENDED", + "TERMINATED" + ], + "description": "Channel Provider Status", + "default": "ACTIVE" + } + }, + "required": [ + "name" + ] } }, "404": { "description": "Channel Provider Not Found" } }, - "scopes": ["commerce.channel-provider:update"] + "scopes": [ + "commerce.channel-provider:update" + ] }, { "operationId": "getChannelProviderById", @@ -285,7 +9360,14 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Id.yaml" + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "unique identifier", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" } } ], @@ -293,14 +9375,72 @@ "200": { "description": "Channel provider Found", "schema": { - "$ref": "./models/ChannelProvider.yaml" + "$id": "https://godaddy.com/schemas/commerce/channel-provider.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelProvider", + "type": "object", + "description": "Resource representing the Channel Provider", + "properties": { + "channelProviderId": { + "$id": "https://godaddy.com/schemas/commerce/channelapi/Id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "unique identifier", + "type": "string", + "format": "uuid", + "example": "id", + "pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}" + }, + "name": { + "type": "string", + "description": "Name of the channel provider", + "maxLength": 128 + }, + "supportedChannelTypes": { + "type": "array", + "description": "Channel types supported by provider", + "items": { + "$id": "https://godaddy.com/schemas/commerce/channel-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelType", + "type": "string", + "description": "ChannelType", + "enum": [ + "RETAIL", + "ONLINE", + "MOBILE", + "MARKETPLACE", + "SOCIAL", + "DEFAULT" + ] + } + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/channel-provider-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ChannelProviderStatus", + "type": "string", + "enum": [ + "ACTIVE", + "SUSPENDED", + "TERMINATED" + ], + "description": "Channel Provider Status", + "default": "ACTIVE" + } + }, + "required": [ + "name" + ] } }, "404": { "description": "Channel provider Not Found" } }, - "scopes": ["commerce.channel-provider:read"] + "scopes": [ + "commerce.channel-provider:read" + ] } ] -} +} \ No newline at end of file diff --git a/src/cli/schemas/api/chargebacks.json b/src/cli/schemas/api/chargebacks.json new file mode 100644 index 0000000..2100c44 --- /dev/null +++ b/src/cli/schemas/api/chargebacks.json @@ -0,0 +1,3506 @@ +{ + "name": "chargebacks", + "title": "Chargeback Management", + "description": "API capable of fetching, challenging and accepting chargebacks and managing related disputes", + "version": "1.0.0", + "baseUrl": "https://api.godaddy.com/v1/commerce", + "endpoints": [ + { + "operationId": "post_transaction_disputes_disputeId_submit", + "method": "POST", + "path": "/transaction-disputes/{disputeId}/submit", + "summary": "Submit evidence", + "description": "Submit dispute documents with dispute notes", + "requestBody": { + "required": true, + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/chargeabck/dispute-notes.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DisputeNotes", + "type": "object", + "description": "Notes related to the dispute and associated documents.", + "properties": { + "disputeNote": { + "type": "string", + "description": "A note providing additional context or information specifically about the dispute.", + "example": "Customer did not recognize the transaction, initiated dispute." + }, + "documentNote": { + "type": "string", + "description": "A note pertaining to the documents linked to the dispute, summarizing their content or relevance.", + "example": "Transaction receipt and customer communication logs attached." + } + } + } + }, + "responses": { + "200": { + "description": "Submit status", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/chargeabck/submit-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SubmitResponse", + "type": "object", + "description": "Submit Status", + "properties": { + "status": { + "type": "string", + "description": "Indicate success by returning 'SUCCESS'", + "example": "SUCCESS" + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.transaction-disputes:update" + ] + }, + { + "operationId": "post_transaction_disputes_disputeId_accept", + "method": "POST", + "path": "/transaction-disputes/{disputeId}/accept", + "summary": "Accept a chargeback", + "description": "Accept a chargeback when you don't want to fight back", + "parameters": [ + { + "name": "disputeId", + "in": "path", + "required": true, + "description": "Dispute unique identifier in the format of a URN with 'urn:dsp:' prefix followed by a UUID", + "schema": { + "type": "string", + "pattern": "^urn:dsp:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + } + } + ], + "responses": { + "200": { + "description": "Submit status", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/chargeabck/accept-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AcceptResponse", + "type": "object", + "description": "Accept Status", + "properties": { + "status": { + "type": "string", + "description": "Indicate success by returning 'SUCCESS'", + "example": "SUCCESS" + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.transaction-disputes:update" + ] + }, + { + "operationId": "patch_transaction_disputes_disputeId", + "method": "PATCH", + "path": "/transaction-disputes/{disputeId}", + "summary": "Update Dispute", + "description": "Either transactionId related to the dispute can be updated, or isReviewed can be updated", + "parameters": [ + { + "name": "disputeId", + "in": "path", + "required": true, + "description": "Dispute unique identifier in the format of a URN with 'urn:dsp:' prefix followed by a UUID", + "schema": { + "type": "string", + "pattern": "^urn:dsp:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + } + } + ], + "requestBody": { + "required": true, + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/common/patch-request.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "title": "Patch Request", + "description": "An array of JSON patch objects to apply partial updates to resources.", + "items": { + "$id": "https://godaddy.com/schemas/common/patch.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Patch", + "description": "The JSON patch object to apply partial updates to resources.", + "properties": { + "op": { + "type": "string", + "description": "The operation to complete.", + "enum": [ + "add", + "remove", + "replace", + "move", + "copy", + "test" + ] + }, + "path": { + "type": "string", + "description": "The JSON pointer to the target document location at which to complete the operation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ], + "nullable": true, + "description": "The value to apply. The `remove` operation does not require a value." + }, + "from": { + "type": "string", + "description": "The JSON pointer to the target document location from which to move the value. Required for the `move` operation." + } + }, + "required": [ + "op" + ] + } + } + }, + "responses": { + "204": { + "description": "No Content" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.transaction-disputes:update" + ] + }, + { + "operationId": "get_transaction_disputes_disputeId", + "method": "GET", + "path": "/transaction-disputes/{disputeId}", + "summary": "Retrieve dispute details", + "description": "Retrieve the dispute information with disputeId", + "parameters": [ + { + "name": "disputeId", + "in": "path", + "required": true, + "description": "Dispute unique identifier in the format of a URN with 'urn:dsp:' prefix followed by a UUID", + "schema": { + "type": "string", + "pattern": "^urn:dsp:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + } + } + ], + "responses": { + "200": { + "description": "A dispute", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/chargeabck/simple-dispute.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleDispute", + "type": "object", + "description": "Dispute details including phase and status information", + "properties": { + "disputeId": { + "description": "Dispute unique identifier in the format of a URN with 'urn:dsp:' prefix followed by a UUID", + "type": "string", + "pattern": "^urn:dsp:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + }, + "disputePhaseId": { + "description": "Dispute phase unique identifier in the format of a URN with 'urn:dph:' prefix followed by a UUID", + "type": "string", + "pattern": "^urn:dph:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + }, + "chargebackControlNumber": { + "description": "External unique identifier for a chargeback", + "type": "string" + }, + "transactionId": { + "description": "Unique identifier for transaction", + "type": "string", + "format": "uuid" + }, + "businessId": { + "description": "Unique identifier for business", + "type": "string", + "format": "uuid" + }, + "storeId": { + "description": "Unique identifier for store", + "type": "string", + "format": "uuid" + }, + "distributorId": { + "description": "Unique identifier for distributor", + "type": "string", + "format": "uuid" + }, + "customerName": { + "description": "Name of the customer", + "type": "string" + }, + "disputePhase": { + "$id": "https://godaddy.com/schema/common/dispute-phase.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Dispute Phase", + "description": "The phase of the dispute. Possible values [First Chargeback, Second Chargeback, Chargeback Reversal, Arbitration, Compliance, Good Faith, Fee, Pre-Arbitration, Pre-Compliance, Pre-Note, Retrieval, Collections, ACH RETURN]" + }, + "disputePhaseStatus": { + "$id": "https://godaddy.com/schema/common/phase-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phase Status", + "description": "The status of the dispute phase. Possible values [New, Pending Submission, Submitted to Acquirer, Expired, Accepted, Declined, Fee Acknowledged, Fulfilled Merchant, Fulfilled-Acquirer, Reversed, Return Created]" + }, + "disputeStatus": { + "$id": "https://godaddy.com/schema/common/dispute-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Dispute Status", + "description": "The status of the dispute", + "enum": [ + "NEED_RESPONSE", + "IN_REVIEW", + "LOST", + "WON" + ] + }, + "isReviewed": { + "type": "boolean", + "description": "Indicate whether merchants have reviewed WIN/LOST status of a chargeback phase" + }, + "processor": { + "type": "string", + "enum": [ + "ELAVON", + "ADYEN" + ] + }, + "txnAmount": { + "type": "integer", + "description": "The amount associated with the original transaction" + }, + "chargebackAmount": { + "type": "integer", + "description": "The amount associated with the chargeback" + }, + "currency": { + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "reasonCode": { + "type": "string", + "description": "The reason Code of the chargeback" + }, + "isActionable": { + "type": "boolean", + "description": "Indicate whether merchants should take an action", + "nullable": true + }, + "isRespondable": { + "type": "boolean", + "description": "Indicate whether merchants can respond (upload and submit) to a dispute", + "nullable": true + }, + "isAccepted": { + "type": "boolean", + "description": "Indicate whether merchants accepted the chargeback" + }, + "isRefundSettledIncluded": { + "type": "boolean", + "description": "Indicate whether original transaction has settled refunds" + }, + "refundDetails": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/chargeabck/refund-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RefundDetail", + "type": "object", + "description": "Refund details of the original transaction", + "properties": { + "refundTxnId": { + "type": "string", + "description": "Refund transaction Id" + }, + "isSettled": { + "type": "boolean", + "description": "Indicate whether the refund transaction is settled" + }, + "amount": { + "type": "integer", + "description": "The amount associated with the refund transaction" + }, + "currency": { + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + } + } + }, + "description": "A list of refund details of the original transaction" + }, + "expiresAt": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "processBy": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "receivedAt": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.transaction-disputes:read" + ] + }, + { + "operationId": "get_transaction_disputes", + "method": "GET", + "path": "/transaction-disputes", + "summary": "Retrieve a list of disputes", + "description": "Retrieve a list of disputes filtered by constraints. This endpoint won't provide refund related details. Please use /disputes/{disputeId} if you need this information", + "parameters": [ + { + "name": "disputeIds", + "in": "query", + "required": false, + "description": "A list of dispute unique identifiers", + "schema": { + "type": "string" + } + }, + { + "name": "chargebackControlNumbers", + "in": "query", + "required": false, + "description": "A list of external unique identifiers for chargeback cases", + "schema": { + "type": "string" + } + }, + { + "name": "transactionIds", + "in": "query", + "required": false, + "description": "A list of unique identifiers for transactions", + "schema": { + "type": "string" + } + }, + { + "name": "businessIds", + "in": "query", + "required": false, + "description": "A list of unique identifiers for businesses", + "schema": { + "type": "string" + } + }, + { + "name": "storeId", + "in": "query", + "required": false, + "description": "An unique identifier for storeId", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "disputePhase", + "in": "query", + "required": false, + "description": "The current phase of the dispute", + "schema": { + "$id": "https://godaddy.com/schema/common/dispute-phase.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Dispute Phase", + "description": "The phase of the dispute. Possible values [First Chargeback, Second Chargeback, Chargeback Reversal, Arbitration, Compliance, Good Faith, Fee, Pre-Arbitration, Pre-Compliance, Pre-Note, Retrieval, Collections, ACH RETURN]" + } + }, + { + "name": "phaseStatuses", + "in": "query", + "required": false, + "description": "A list of statuses of the dispute phase. Choose to filter by either phaseStatuses or disputeStatus", + "schema": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schema/common/phase-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phase Status", + "description": "The status of the dispute phase. Possible values [New, Pending Submission, Submitted to Acquirer, Expired, Accepted, Declined, Fee Acknowledged, Fulfilled Merchant, Fulfilled-Acquirer, Reversed, Return Created]" + } + } + }, + { + "name": "disputeStatus", + "in": "query", + "required": false, + "description": "The overall status of the dispute. Choose to filter by either phaseStatuses or disputeStatus", + "schema": { + "$id": "https://godaddy.com/schema/common/dispute-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Dispute Status", + "description": "The status of the dispute", + "enum": [ + "NEED_RESPONSE", + "IN_REVIEW", + "LOST", + "WON" + ] + } + }, + { + "name": "isReviewed", + "in": "query", + "required": false, + "description": "Indicate whether merchants have reviewed WIN/LOST status of a chargeback phase", + "schema": { + "type": "boolean" + } + }, + { + "name": "isAccepted", + "in": "query", + "required": false, + "description": "Indicate whether merchants accepted the dispute", + "schema": { + "type": "boolean" + } + }, + { + "name": "isActionable", + "in": "query", + "required": false, + "description": "Indicate whether merchants should take an action.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isRespondable", + "in": "query", + "required": false, + "description": "Indicate whether merchants can upload a document.", + "schema": { + "type": "boolean" + } + }, + { + "name": "reasonCodes", + "in": "query", + "required": false, + "description": "A list of reason Code of the chargeback", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "processor", + "in": "query", + "required": false, + "description": "The processor of the dispute", + "schema": { + "type": "string", + "enum": [ + "ELAVON", + "ADYEN" + ] + } + }, + { + "name": "currency", + "in": "query", + "required": false, + "description": "The currency in which the amount is specified", + "schema": { + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + } + }, + { + "name": "sortBy", + "in": "query", + "required": false, + "description": "The field by which to sort the results. 'disputeExpiredAt' and 'disputeProcessedBy' share the same enum 'EXPIRED_AT'. Default is 'UPDATED_AT'", + "schema": { + "type": "string", + "enum": [ + "RECEIVED_AT", + "EXPIRED_AT", + "UPDATED_AT" + ], + "default": "UPDATED_AT" + } + }, + { + "name": "sortOrder", + "in": "query", + "required": false, + "description": "The order of sorting, either ascending ('ASC') or descending ('DESC'). Default is descending ('DESC')", + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ], + "default": "DESC" + } + }, + { + "name": "processByAfter", + "in": "query", + "required": false, + "description": "Filter disputes to be processed after a given date/time (RFC 3339)", + "schema": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + { + "name": "processByBefore", + "in": "query", + "required": false, + "description": "Filter disputes to be processed before a given date/time (RFC 3339)", + "schema": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + { + "name": "expiresAfter", + "in": "query", + "required": false, + "description": "Filter disputes expiring after a specified date/time (RFC 3339)", + "schema": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + { + "name": "expiresBefore", + "in": "query", + "required": false, + "description": "Filter disputes expiring before a specified date/time (RFC 3339)", + "schema": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + { + "name": "receivedAfter", + "in": "query", + "required": false, + "description": "Filters for disputes that were received after the specified date and time. The date and time should be RFC 3339 format", + "schema": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + { + "name": "receivedBefore", + "in": "query", + "required": false, + "description": "Filters for disputes that were received before the specified date and time. The date and time should be RFC 3339 format", + "schema": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The number of records per page. Default is 10", + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number of the results to retrieve. Default is 1", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "totalRequired", + "in": "query", + "required": false, + "description": "A boolean that indicates whether the total number of records is required. Default is false", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "A list of disputes including pagination", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/chargeabck/simple-dispute-list.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleDisputeList", + "type": "object", + "description": "Represents a collection of dispute items, each containing key details of individual disputes, along with navigation links for pagination or related actions", + "properties": { + "items": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/chargeabck/simple-dispute.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleDispute", + "type": "object", + "description": "Dispute details including phase and status information", + "properties": { + "disputeId": { + "description": "Dispute unique identifier in the format of a URN with 'urn:dsp:' prefix followed by a UUID", + "type": "string", + "pattern": "^urn:dsp:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + }, + "disputePhaseId": { + "description": "Dispute phase unique identifier in the format of a URN with 'urn:dph:' prefix followed by a UUID", + "type": "string", + "pattern": "^urn:dph:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + }, + "chargebackControlNumber": { + "description": "External unique identifier for a chargeback", + "type": "string" + }, + "transactionId": { + "description": "Unique identifier for transaction", + "type": "string", + "format": "uuid" + }, + "businessId": { + "description": "Unique identifier for business", + "type": "string", + "format": "uuid" + }, + "storeId": { + "description": "Unique identifier for store", + "type": "string", + "format": "uuid" + }, + "distributorId": { + "description": "Unique identifier for distributor", + "type": "string", + "format": "uuid" + }, + "customerName": { + "description": "Name of the customer", + "type": "string" + }, + "disputePhase": { + "$id": "https://godaddy.com/schema/common/dispute-phase.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Dispute Phase", + "description": "The phase of the dispute. Possible values [First Chargeback, Second Chargeback, Chargeback Reversal, Arbitration, Compliance, Good Faith, Fee, Pre-Arbitration, Pre-Compliance, Pre-Note, Retrieval, Collections, ACH RETURN]" + }, + "disputePhaseStatus": { + "$id": "https://godaddy.com/schema/common/phase-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phase Status", + "description": "The status of the dispute phase. Possible values [New, Pending Submission, Submitted to Acquirer, Expired, Accepted, Declined, Fee Acknowledged, Fulfilled Merchant, Fulfilled-Acquirer, Reversed, Return Created]" + }, + "disputeStatus": { + "$id": "https://godaddy.com/schema/common/dispute-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Dispute Status", + "description": "The status of the dispute", + "enum": [ + "NEED_RESPONSE", + "IN_REVIEW", + "LOST", + "WON" + ] + }, + "isReviewed": { + "type": "boolean", + "description": "Indicate whether merchants have reviewed WIN/LOST status of a chargeback phase" + }, + "processor": { + "type": "string", + "enum": [ + "ELAVON", + "ADYEN" + ] + }, + "txnAmount": { + "type": "integer", + "description": "The amount associated with the original transaction" + }, + "chargebackAmount": { + "type": "integer", + "description": "The amount associated with the chargeback" + }, + "currency": { + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "reasonCode": { + "type": "string", + "description": "The reason Code of the chargeback" + }, + "isActionable": { + "type": "boolean", + "description": "Indicate whether merchants should take an action", + "nullable": true + }, + "isRespondable": { + "type": "boolean", + "description": "Indicate whether merchants can respond (upload and submit) to a dispute", + "nullable": true + }, + "isAccepted": { + "type": "boolean", + "description": "Indicate whether merchants accepted the chargeback" + }, + "isRefundSettledIncluded": { + "type": "boolean", + "description": "Indicate whether original transaction has settled refunds" + }, + "refundDetails": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/chargeabck/refund-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "RefundDetail", + "type": "object", + "description": "Refund details of the original transaction", + "properties": { + "refundTxnId": { + "type": "string", + "description": "Refund transaction Id" + }, + "isSettled": { + "type": "boolean", + "description": "Indicate whether the refund transaction is settled" + }, + "amount": { + "type": "integer", + "description": "The amount associated with the refund transaction" + }, + "currency": { + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + } + } + }, + "description": "A list of refund details of the original transaction" + }, + "expiresAt": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "processBy": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "receivedAt": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + }, + "description": "An array of dispute items" + }, + "totalItems": { + "type": "integer", + "description": "Indicate the total number of items in the full result list. Only be returned when totalRequired is set to true" + }, + "totalPages": { + "type": "integer", + "description": "Indicate the total number of pages of response available. Only be returned when totalRequired is set to true" + }, + "links": { + "type": "array", + "items": null, + "description": "An array of link objects providing navigational URLs" + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.transaction-disputes:read" + ] + }, + { + "operationId": "post_transaction_disputes_disputeId_documents", + "method": "POST", + "path": "/transaction-disputes/{disputeId}/documents", + "summary": "Upload evidence", + "description": "When disputing a chargeback, you can upload evidence", + "parameters": [ + { + "name": "disputeId", + "in": "path", + "required": true, + "description": "Dispute unique identifier in the format of a URN with 'urn:dsp:' prefix followed by a UUID", + "schema": { + "type": "string", + "pattern": "^urn:dsp:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + } + } + ], + "requestBody": { + "required": true, + "contentType": "multipart/form-data", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/chargeabck/document.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Document", + "type": "object", + "description": "Document file and context", + "properties": { + "file": { + "type": "string", + "format": "binary", + "description": "Binary file content" + }, + "documentType": { + "type": "string", + "description": "Type of the document. Possible values include [Drivers License, Tax Return, Passport, Trade, KYC, Other]" + }, + "mimeType": { + "type": "string", + "description": "MIME type of the document. Possible values include [application/pdf, image/tiff, image/jpeg]" + }, + "documentDescription": { + "type": "string", + "description": "Description of the document" + } + } + } + }, + "responses": { + "200": { + "description": "Document meta data", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/chargeabck/document-metadata.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DocumentMetaData", + "type": "object", + "description": "Document meta data", + "properties": { + "documentId": { + "type": "string", + "description": "An array of document unique identifiers in the format of a URN with 'urn:doc:' prefix followed by a UUID", + "pattern": "^urn:doc:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "size": { + "type": "integer", + "description": "Size of the document in bytes" + }, + "url": { + "type": "string", + "format": "uri", + "description": "URL pointing to the document" + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.transaction-disputes:create" + ] + }, + { + "operationId": "get_transaction_disputes_disputeId_documents", + "method": "GET", + "path": "/transaction-disputes/{disputeId}/documents", + "summary": "Retrieve a list of dispute documents", + "description": "Retrieve a list of dispute documents", + "parameters": [ + { + "name": "disputeId", + "in": "path", + "required": true, + "description": "Dispute unique identifier in the format of a URN with 'urn:dsp:' prefix followed by a UUID", + "schema": { + "type": "string", + "pattern": "^urn:dsp:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + } + }, + { + "name": "disputeDocumentIds", + "in": "query", + "required": false, + "description": "A list of dispute document unique identifiers", + "schema": { + "type": "string" + } + }, + { + "name": "disputePhase", + "in": "query", + "required": false, + "description": "The current phase of the dispute", + "schema": { + "$id": "https://godaddy.com/schema/common/phase-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phase Status", + "description": "The status of the dispute phase. Possible values [New, Pending Submission, Submitted to Acquirer, Expired, Accepted, Declined, Fee Acknowledged, Fulfilled Merchant, Fulfilled-Acquirer, Reversed, Return Created]" + } + }, + { + "name": "deleted", + "in": "query", + "required": false, + "description": "Indicate whether the document is deleted", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTime", + "in": "query", + "required": false, + "description": "Filters for dispute documents that were created after the specified date and time. The date and time should be in RFC 3339 format", + "schema": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + { + "name": "endTime", + "in": "query", + "required": false, + "description": "Filters for dispute documents that were created before the specified date and time. The date and time should be in RFC 3339 format", + "schema": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "The number of records per page. Default is 10", + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number of the results to retrieve. Default is 1", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "totalRequired", + "in": "query", + "required": false, + "description": "A boolean that indicates whether the total number of records is required. Default is false", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Dispute document list with pagination", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/chargeabck/dispute-document-list.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DisputeDocumentList", + "type": "object", + "description": "Represents a collection of dispute document items, each containing key details of individual dispute documents, along with navigation links for pagination or related actions", + "properties": { + "items": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/chargeabck/simple-dispute-document.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleDisputeDocument", + "type": "object", + "description": "Dispute document details", + "properties": { + "disputeDocumentId": { + "description": "Dispute Document unique identifier in the format of a URN with 'urn:doc:' prefix followed by a UUID", + "type": "string", + "pattern": "^urn:doc:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + }, + "disputeId": { + "description": "Dispute unique identifier in the format of a URN with 'urn:dsp:' prefix followed by a UUID", + "type": "string", + "pattern": "^urn:dsp:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + }, + "filename": { + "description": "The name of the dispute document file", + "type": "string" + }, + "documentType": { + "type": "string", + "description": "Type of the document. Possible values include [Drivers License, Tax Return, Passport, Trade, KYC, Other]" + }, + "mimeType": { + "type": "string", + "description": "MIME type of the document. Possible values include [application/pdf, image/tiff, image/jpeg]" + }, + "documentDescription": { + "type": "string", + "description": "Description of the document" + }, + "disputePhase": { + "$id": "https://godaddy.com/schema/common/dispute-phase.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Dispute Phase", + "description": "The phase of the dispute. Possible values [First Chargeback, Second Chargeback, Chargeback Reversal, Arbitration, Compliance, Good Faith, Fee, Pre-Arbitration, Pre-Compliance, Pre-Note, Retrieval, Collections, ACH RETURN]" + }, + "processor": { + "description": "The processor of the dispute", + "type": "string", + "enum": [ + "ELAVON", + "ADYEN" + ] + }, + "status": { + "description": "Document upload and submit status. Possible value include [Inprogress, SUCCESS, Successfully Uploaded, DOC_SZ_LRG, Scan Failed]. The final successful stage is 'Successfully Uploaded'", + "type": "string" + }, + "link": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + }, + "submittedAt": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + }, + "description": "An array of dispute document items" + }, + "totalItems": { + "type": "integer", + "description": "Indicate the total number of items in the full result list. Only be returned when totalRequired is set to true" + }, + "totalPages": { + "type": "integer", + "description": "Indicate the total number of pages of response available. Only be returned when totalRequired is set to true" + }, + "links": { + "type": "array", + "items": null, + "description": "An array of link objects providing navigational URLs" + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.transaction-disputes:read" + ] + }, + { + "operationId": "delete_transaction_disputes_disputeId_documents_disputeDocumentId", + "method": "DELETE", + "path": "/transaction-disputes/{disputeId}/documents/{disputeDocumentId}", + "summary": "Delete an uploaded document", + "description": "Delete an uploaded document. You cannot delete a submitted document.", + "parameters": [ + { + "name": "disputeId", + "in": "path", + "required": true, + "description": "Dispute unique identifier in the format of a URN with 'urn:dsp:' prefix followed by a UUID", + "schema": { + "type": "string", + "pattern": "^urn:dsp:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + } + }, + { + "name": "disputeDocumentId", + "in": "path", + "required": true, + "description": "Dispute Document unique identifier in the format of a URN with 'urn:doc:' prefix followed by a UUID", + "schema": { + "type": "string", + "pattern": "^urn:doc:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + } + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.transaction-disputes:delete" + ] + }, + { + "operationId": "get_transaction_disputes_disputeId_documents_disputeDocumentId", + "method": "GET", + "path": "/transaction-disputes/{disputeId}/documents/{disputeDocumentId}", + "summary": "Getting an uploaded/submitted dispute document", + "description": "This endpoint allows for retrieving of a document associated with a specific dispute. The document is returned as a file attachment in the response.", + "parameters": [ + { + "name": "disputeId", + "in": "path", + "required": true, + "description": "Dispute unique identifier in the format of a URN with 'urn:dsp:' prefix followed by a UUID", + "schema": { + "type": "string", + "pattern": "^urn:dsp:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + } + }, + { + "name": "disputeDocumentId", + "in": "path", + "required": true, + "description": "Dispute Document unique identifier in the format of a URN with 'urn:doc:' prefix followed by a UUID", + "schema": { + "type": "string", + "pattern": "^urn:doc:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" + } + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the document.", + "schema": { + "type": "string", + "format": "binary" + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.transaction-disputes:read" + ] + }, + { + "operationId": "get_transaction_dispute_document_constraints", + "method": "GET", + "path": "/transaction-dispute-document-constraints", + "summary": "", + "parameters": [ + { + "name": "processor", + "in": "query", + "required": true, + "description": "The processor of the disputes", + "schema": { + "type": "string", + "enum": [ + "ADYEN", + "ELAVON" + ] + } + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the file constraints.", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/chargeabck/document-constraints.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DocumentConstraints", + "type": "object", + "description": "The constraints of the defense documents to be uploaded", + "properties": { + "properties": { + "fileExtensions": { + "description": "A list of allowed file extensions", + "type": "array", + "items": { + "type": "string" + } + }, + "maxFileSizes": { + "description": "A list of maximum file sizes", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/chargeabck/max-file-size.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "MaxFileSize", + "type": "object", + "description": "The maximum size of the file", + "properties": { + "properties": { + "mimeType": { + "description": "allowed mimeType", + "type": "String" + }, + "maxFileSize": { + "description": "maximum file size based on the mimeType in MB", + "type": "integer" + } + } + } + } + }, + "maxFileCount": { + "description": "Allowed maximum number of files to be submitted in total", + "type": "integer" + }, + "additionalConstraints": { + "description": "Additional constraints from different credit card brands", + "type": "string" + } + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.transaction-disputes:read" + ] + } + ] +} \ No newline at end of file diff --git a/src/cli/schemas/api/customer-profiles.json b/src/cli/schemas/api/customer-profiles.json new file mode 100644 index 0000000..58227e0 --- /dev/null +++ b/src/cli/schemas/api/customer-profiles.json @@ -0,0 +1,6729 @@ +{ + "name": "customer-profiles", + "title": "Customers API", + "description": "This API can be used to retrieve, create, update and delete customers as well as customer information.", + "version": "1.1.0", + "baseUrl": "https://api.godaddy.com/v1/commerce", + "endpoints": [ + { + "operationId": "CustomersList", + "method": "GET", + "path": "/stores/{storeId}/customers", + "summary": "Get customers", + "description": "This endpoint can be used to retrieve a list of customers for a specific store. Deleted customers are excluded by default.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "An identifier for a store", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page of results to return for pagination. Only supported up to the first 10 000 records of a result set. Use pageToken rather than page where possible. PageToken and page can not be used in combination, doing so will result in a 422 response.", + "schema": { + "type": "integer", + "format": "integer-positive", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "Maximum number of items to return. If used with page will return results with an offset of page * pageSize", + "schema": { + "type": "integer", + "format": "integer-positive", + "default": 25, + "maximum": 500 + } + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "description": "Use the `pageToken` returned from a previous search in order to obtain the next set of results. Use pageToken rather than page where possible. PageToken and page can not be used in combination, doing so will result in a 422 response.", + "schema": { + "type": "string" + } + }, + { + "name": "totalRequired", + "in": "query", + "required": false, + "description": "Indicates whether the response should include the total number of items and pages through response properties totalItems and totalPages respectively.", + "schema": { + "type": "boolean" + } + }, + { + "name": "queryString", + "in": "query", + "required": false, + "description": "Search term - this string will be matched as a starts with for all text fields", + "schema": { + "type": "string" + } + }, + { + "name": "nonEmptyFields", + "in": "query", + "required": false, + "description": "Filter customers by presence of at least one of these fields", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "EMAIL", + "FIRST_NAME", + "LAST_NAME", + "PHONE" + ] + } + } + }, + { + "name": "emptyFields", + "in": "query", + "required": false, + "description": "Filter customers by absence of at least one of these fields", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "EMAIL", + "FIRST_NAME", + "LAST_NAME", + "PHONE" + ] + } + } + }, + { + "name": "allNonEmptyFields", + "in": "query", + "required": false, + "description": "Filter customers by presence of all of these fields", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "EMAIL", + "FIRST_NAME", + "LAST_NAME", + "PHONE" + ] + } + } + }, + { + "name": "allEmptyFields", + "in": "query", + "required": false, + "description": "Filter customers by absence of all of these fields", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "EMAIL", + "FIRST_NAME", + "LAST_NAME", + "PHONE" + ] + } + } + }, + { + "name": "externalIdentifiers", + "in": "query", + "required": false, + "description": "Filter customers by external identifier; provide as comma separated values in the form `type:value` (eg: `poynt:123,asin:B0B9F7WNQH`)", + "schema": { + "type": "array", + "items": { + "type": "string", + "description": "External identifier type and value separated by a colon, eg `poynt:123`" + } + } + }, + { + "name": "updatedAtStart", + "in": "query", + "required": false, + "description": "Filter customers whose updatedAt is >= the specified date", + "schema": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + { + "name": "updatedAtEnd", + "in": "query", + "required": false, + "description": "Filter customers whose updatedAt is <= the specified date", + "schema": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + ], + "responses": { + "200": { + "description": "Request was successful", + "schema": { + "allOf": [ + { + "type": "object", + "required": [ + "links" + ], + "properties": { + "links": { + "description": "HATEOAS link relations", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "totalItems": { + "type": "integer", + "description": "The total number of items in the full result set. Only returned if the `totalRequired` param is true" + }, + "totalPages": { + "type": "integer", + "description": "The total number of pages of results in the full result set. Only returned if the `totalRequired` param is true" + } + } + }, + { + "type": "object", + "required": [ + "customers" + ], + "properties": { + "customers": { + "type": "array", + "description": "Array of customers", + "items": { + "allOf": [ + { + "allOf": [ + { + "description": "Customer identifier that is unique within current Store", + "type": "object", + "properties": { + "customerId": { + "type": "string", + "format": "uuid" + } + } + }, + { + "type": "object", + "required": [ + "firstName", + "lastName", + "email", + "phone" + ], + "properties": { + "firstName": { + "type": "string", + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\@&' ]*$", + "example": "Fredrick", + "maxLength": 50 + }, + "lastName": { + "type": "string", + "example": "Smith", + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\@&' ]*$", + "maxLength": 50 + }, + "organization": { + "type": "string", + "format": "organization-name", + "example": "GoDaddy", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\\\@&!' +]*$" + }, + "jobTitle": { + "type": "string" + }, + "nickname": { + "description": "Name by which customer should be addressed", + "type": "string", + "example": "Fred", + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\@&' ]*$", + "maxLength": 50 + }, + "addresses": { + "description": "Array of customer addresses. Note that currently only one address is supported", + "items": { + "type": "object", + "properties": { + "address1": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "address2": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "city": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "state": { + "type": "string", + "description": "State or province or territory", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "postalCode": { + "type": "string", + "description": "Postal or zip code", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "country": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,2}$", + "description": "Country ISO code" + }, + "label": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$", + "description": "A descriptive name for the address" + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "emails": { + "description": "Array of email addresses", + "items": { + "required": [ + "email" + ], + "properties": { + "email": { + "$id": "https://godaddy.com/schemas/common/email-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A valid, internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.", + "type": "string", + "minLength": 3, + "maxLength": 254, + "pattern": "^.+@[^\"\\-].+$" + }, + "label": { + "description": "A user provided name for the email address", + "type": "string", + "maxLength": 255 + }, + "default": { + "description": "Indicates whether the email is the primary email.", + "type": "boolean" + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "instantMessages": { + "description": "Array of instant messaging accounts associated with the customer", + "items": { + "required": [ + "accountKey" + ], + "properties": { + "accountKey": { + "description": "An accountKey for the instant messaging account", + "type": "string", + "maxLength": 255 + }, + "label": { + "description": "A user provided name for the external service", + "type": "string", + "maxLength": 255 + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "socialProfiles": { + "description": "Array of social profiles associated with the customer", + "items": { + "required": [ + "accountKey" + ], + "properties": { + "accountKey": { + "description": "An accountKey for the social profile", + "type": "string", + "maxLength": 255 + }, + "label": { + "description": "A user provided name for the external service", + "type": "string", + "maxLength": 255 + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "phones": { + "description": "Array of phone numbers", + "items": { + "type": "object", + "required": [ + "phone" + ], + "properties": { + "phone": { + "description": "A customer phone number", + "type": "string", + "format": "phone", + "maxLength": 17 + }, + "label": { + "description": "A user provided name for the phone number", + "type": "string", + "maxLength": 255 + }, + "default": { + "description": "Indicates whether the phone is the primary phone.", + "type": "boolean" + } + } + }, + "default": [], + "type": "array", + "maxLength": 10 + }, + "urls": { + "description": "Array of urls associated with the customer", + "items": { + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A url associated with the customer", + "type": "string", + "format": "url", + "maxLength": 2083 + }, + "label": { + "description": "A user provided name for the url", + "type": "string", + "maxLength": 255 + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + } + } + } + ] + }, + { + "type": "object", + "required": [ + "updatedAt" + ], + "properties": { + "updatedAt": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + }, + { + "required": [ + "listKeys" + ], + "properties": { + "listKeys": { + "description": "List memberships that should be changed for the customer", + "items": { + "type": "string", + "format": "uuid" + }, + "type": "array" + } + } + }, + { + "type": "object", + "required": [ + "customerId" + ], + "properties": { + "joined": { + "description": "Whether the customer has been joined with one or more other customers to create a single customer", + "type": "boolean", + "default": false + }, + "trackingDisabled": { + "description": "Whether the customer has opted out of tracking (eg. email opens and link clicks)", + "type": "boolean", + "default": false + }, + "orderCount": { + "description": "Number of orders the customer has made", + "type": "integer", + "minimum": 0 + }, + "profileImageUrl": { + "description": "Url of the profile images for the customer", + "type": "string", + "format": "url" + }, + "paymentCount": { + "description": "Number of payments the customer has completed", + "type": "integer", + "minimum": 0 + } + } + } + ] + } + } + } + } + ] + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "429": { + "description": "Too many requests received within interval", + "schema": { + "x-error-model": true, + "additionalProperties": false, + "allOf": [ + { + "type": "object", + "properties": { + "retryAfterSec": { + "type": "integer", + "format": "integer-positive", + "pattern": "^[0-9]+$", + "description": "Number of seconds to wait before attempting a similar request" + } + }, + "required": [ + "retryAfterSec" + ] + }, + { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + } + }, + "scopes": [ + "commerce.customer:show" + ] + }, + { + "operationId": "CommerceCustomersCreate", + "method": "POST", + "path": "/stores/{storeId}/customers", + "summary": "Create a new customer", + "description": "This endpoint can be used to create or de-duplicate - using channel data - and merge into existing customer. If the provided channels differ from existing customer data, a new customer will be created. This endpoint will not remove any existing data and is additive in cases where merges occur.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "An identifier for a store", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "description": "Customer data to import", + "contentType": "application/json", + "schema": { + "type": "object", + "required": [ + "customer", + "source" + ], + "properties": { + "customer": { + "allOf": [ + { + "allOf": [ + { + "description": "Customer identifier that is unique within current Store", + "type": "object", + "properties": { + "customerId": { + "type": "string", + "format": "uuid" + } + } + }, + { + "type": "object", + "required": [ + "firstName", + "lastName", + "email", + "phone" + ], + "properties": { + "firstName": { + "type": "string", + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\@&' ]*$", + "example": "Fredrick", + "maxLength": 50 + }, + "lastName": { + "type": "string", + "example": "Smith", + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\@&' ]*$", + "maxLength": 50 + }, + "organization": { + "type": "string", + "format": "organization-name", + "example": "GoDaddy", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\\\@&!' +]*$" + }, + "jobTitle": { + "type": "string" + }, + "nickname": { + "description": "Name by which customer should be addressed", + "type": "string", + "example": "Fred", + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\@&' ]*$", + "maxLength": 50 + }, + "addresses": { + "description": "Array of customer addresses. Note that currently only one address is supported", + "items": { + "type": "object", + "properties": { + "address1": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "address2": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "city": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "state": { + "type": "string", + "description": "State or province or territory", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "postalCode": { + "type": "string", + "description": "Postal or zip code", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "country": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,2}$", + "description": "Country ISO code" + }, + "label": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$", + "description": "A descriptive name for the address" + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "emails": { + "description": "Array of email addresses", + "items": { + "required": [ + "email" + ], + "properties": { + "email": { + "$id": "https://godaddy.com/schemas/common/email-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A valid, internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.", + "type": "string", + "minLength": 3, + "maxLength": 254, + "pattern": "^.+@[^\"\\-].+$" + }, + "label": { + "description": "A user provided name for the email address", + "type": "string", + "maxLength": 255 + }, + "default": { + "description": "Indicates whether the email is the primary email.", + "type": "boolean" + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "instantMessages": { + "description": "Array of instant messaging accounts associated with the customer", + "items": { + "required": [ + "accountKey" + ], + "properties": { + "accountKey": { + "description": "An accountKey for the instant messaging account", + "type": "string", + "maxLength": 255 + }, + "label": { + "description": "A user provided name for the external service", + "type": "string", + "maxLength": 255 + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "socialProfiles": { + "description": "Array of social profiles associated with the customer", + "items": { + "required": [ + "accountKey" + ], + "properties": { + "accountKey": { + "description": "An accountKey for the social profile", + "type": "string", + "maxLength": 255 + }, + "label": { + "description": "A user provided name for the external service", + "type": "string", + "maxLength": 255 + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "phones": { + "description": "Array of phone numbers", + "items": { + "type": "object", + "required": [ + "phone" + ], + "properties": { + "phone": { + "description": "A customer phone number", + "type": "string", + "format": "phone", + "maxLength": 17 + }, + "label": { + "description": "A user provided name for the phone number", + "type": "string", + "maxLength": 255 + }, + "default": { + "description": "Indicates whether the phone is the primary phone.", + "type": "boolean" + } + } + }, + "default": [], + "type": "array", + "maxLength": 10 + }, + "urls": { + "description": "Array of urls associated with the customer", + "items": { + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A url associated with the customer", + "type": "string", + "format": "url", + "maxLength": 2083 + }, + "label": { + "description": "A user provided name for the url", + "type": "string", + "maxLength": 255 + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + } + } + } + ] + }, + { + "type": "object", + "properties": { + "customer": { + "description": "Whether or not the customer has completed transactions with the user", + "type": "boolean", + "default": false + }, + "suppressed": { + "description": "Whether the customer is suppressed, due to opting out from email marketing, or their email address being unreachable", + "type": "boolean", + "default": false + }, + "trackingDisabled": { + "description": "Whether the customer has opted out of tracking (eg. email opens and link clicks)", + "type": "boolean", + "default": false + } + } + }, + { + "type": "object", + "properties": { + "externalIdentifier": { + "type": "object", + "properties": { + "externalId": { + "description": "The external id for the customer in another service", + "type": "string", + "maxLength": 255 + }, + "source": { + "description": "The name of service from which the external id originates", + "type": "string", + "example": "INVOICE", + "maxLength": 255 + } + }, + "required": [ + "externalId", + "source" + ] + } + } + }, + { + "required": [ + "listKeys" + ], + "properties": { + "listKeys": { + "description": "List memberships that should be changed for the customer", + "items": { + "type": "string", + "format": "uuid" + }, + "type": "array" + } + } + } + ] + }, + "source": { + "description": "Source application of the interaction", + "type": "string", + "enum": [ + "COMMERCE", + "CONVERSATIONS", + "EMAIL_MARKETING", + "GDSOCIAL", + "GOPAY", + "INVOICE", + "POYNT", + "ONLINE_APPOINTMENTS", + "ONLINE_STORE", + "PAYMENTS", + "WEBSITE_BUILDER" + ] + } + } + } + }, + "responses": { + "202": { + "description": "A CUSTOMER_CREATE action was successfully created", + "schema": { + "type": "object", + "properties": { + "links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "method": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + }, + "required": [ + "links" + ] + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "429": { + "description": "Too many requests received within interval", + "schema": { + "x-error-model": true, + "additionalProperties": false, + "allOf": [ + { + "type": "object", + "properties": { + "retryAfterSec": { + "type": "integer", + "format": "integer-positive", + "pattern": "^[0-9]+$", + "description": "Number of seconds to wait before attempting a similar request" + } + }, + "required": [ + "retryAfterSec" + ] + }, + { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + } + }, + "scopes": [ + "commerce.customer:create" + ] + }, + { + "operationId": "CommerceCustomersUpdate", + "method": "PATCH", + "path": "/stores/{storeId}/customers/{customerId}", + "summary": "Update customer", + "description": "This endpoint can be used to update the information of a specific customer using the store and customer ID.", + "parameters": [ + { + "name": "customerId", + "in": "path", + "required": true, + "description": "The id of the specific customer", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "storeId", + "in": "path", + "required": true, + "description": "An identifier for a store", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "description": "Customer data to import", + "contentType": "application/json", + "schema": { + "type": "object", + "required": [ + "customer", + "source" + ], + "properties": { + "customer": { + "allOf": [ + { + "allOf": [ + { + "description": "Customer identifier that is unique within current Store", + "type": "object", + "properties": { + "customerId": { + "type": "string", + "format": "uuid" + } + } + }, + { + "type": "object", + "required": [ + "firstName", + "lastName", + "email", + "phone" + ], + "properties": { + "firstName": { + "type": "string", + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\@&' ]*$", + "example": "Fredrick", + "maxLength": 50 + }, + "lastName": { + "type": "string", + "example": "Smith", + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\@&' ]*$", + "maxLength": 50 + }, + "organization": { + "type": "string", + "format": "organization-name", + "example": "GoDaddy", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\\\@&!' +]*$" + }, + "jobTitle": { + "type": "string" + }, + "nickname": { + "description": "Name by which customer should be addressed", + "type": "string", + "example": "Fred", + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\@&' ]*$", + "maxLength": 50 + }, + "addresses": { + "description": "Array of customer addresses. Note that currently only one address is supported", + "items": { + "type": "object", + "properties": { + "address1": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "address2": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "city": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "state": { + "type": "string", + "description": "State or province or territory", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "postalCode": { + "type": "string", + "description": "Postal or zip code", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "country": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,2}$", + "description": "Country ISO code" + }, + "label": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$", + "description": "A descriptive name for the address" + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "emails": { + "description": "Array of email addresses", + "items": { + "required": [ + "email" + ], + "properties": { + "email": { + "$id": "https://godaddy.com/schemas/common/email-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A valid, internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.", + "type": "string", + "minLength": 3, + "maxLength": 254, + "pattern": "^.+@[^\"\\-].+$" + }, + "label": { + "description": "A user provided name for the email address", + "type": "string", + "maxLength": 255 + }, + "default": { + "description": "Indicates whether the email is the primary email.", + "type": "boolean" + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "instantMessages": { + "description": "Array of instant messaging accounts associated with the customer", + "items": { + "required": [ + "accountKey" + ], + "properties": { + "accountKey": { + "description": "An accountKey for the instant messaging account", + "type": "string", + "maxLength": 255 + }, + "label": { + "description": "A user provided name for the external service", + "type": "string", + "maxLength": 255 + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "socialProfiles": { + "description": "Array of social profiles associated with the customer", + "items": { + "required": [ + "accountKey" + ], + "properties": { + "accountKey": { + "description": "An accountKey for the social profile", + "type": "string", + "maxLength": 255 + }, + "label": { + "description": "A user provided name for the external service", + "type": "string", + "maxLength": 255 + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "phones": { + "description": "Array of phone numbers", + "items": { + "type": "object", + "required": [ + "phone" + ], + "properties": { + "phone": { + "description": "A customer phone number", + "type": "string", + "format": "phone", + "maxLength": 17 + }, + "label": { + "description": "A user provided name for the phone number", + "type": "string", + "maxLength": 255 + }, + "default": { + "description": "Indicates whether the phone is the primary phone.", + "type": "boolean" + } + } + }, + "default": [], + "type": "array", + "maxLength": 10 + }, + "urls": { + "description": "Array of urls associated with the customer", + "items": { + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A url associated with the customer", + "type": "string", + "format": "url", + "maxLength": 2083 + }, + "label": { + "description": "A user provided name for the url", + "type": "string", + "maxLength": 255 + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + } + } + } + ] + }, + { + "type": "object", + "properties": { + "customer": { + "description": "Whether or not the customer has completed transactions with the user", + "type": "boolean", + "default": false + }, + "suppressed": { + "description": "Whether the customer is suppressed, due to opting out from email marketing, or their email address being unreachable", + "type": "boolean", + "default": false + }, + "trackingDisabled": { + "description": "Whether the customer has opted out of tracking (eg. email opens and link clicks)", + "type": "boolean", + "default": false + } + } + }, + { + "type": "object", + "properties": { + "externalIdentifier": { + "type": "object", + "properties": { + "externalId": { + "description": "The external id for the customer in another service", + "type": "string", + "maxLength": 255 + }, + "source": { + "description": "The name of service from which the external id originates", + "type": "string", + "example": "INVOICE", + "maxLength": 255 + } + }, + "required": [ + "externalId", + "source" + ] + } + } + }, + { + "required": [ + "listKeys" + ], + "properties": { + "listKeys": { + "description": "List memberships that should be changed for the customer", + "items": { + "type": "string", + "format": "uuid" + }, + "type": "array" + } + } + }, + { + "type": "object", + "required": [ + "updatedAt" + ], + "properties": { + "updatedAt": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + ] + }, + "source": { + "description": "Source application of the interaction", + "type": "string", + "enum": [ + "COMMERCE", + "CONVERSATIONS", + "EMAIL_MARKETING", + "GDSOCIAL", + "GOPAY", + "INVOICE", + "POYNT", + "ONLINE_APPOINTMENTS", + "ONLINE_STORE", + "PAYMENTS", + "WEBSITE_BUILDER" + ] + } + } + } + }, + "responses": { + "202": { + "description": "A CUSTOMER_UPDATE action was successfully created", + "schema": { + "type": "object", + "properties": { + "links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "method": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + }, + "required": [ + "links" + ] + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "429": { + "description": "Too many requests received within interval", + "schema": { + "x-error-model": true, + "additionalProperties": false, + "allOf": [ + { + "type": "object", + "properties": { + "retryAfterSec": { + "type": "integer", + "format": "integer-positive", + "pattern": "^[0-9]+$", + "description": "Number of seconds to wait before attempting a similar request" + } + }, + "required": [ + "retryAfterSec" + ] + }, + { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + } + }, + "scopes": [ + "commerce.customer:update" + ] + }, + { + "operationId": "FetchCustomer", + "method": "GET", + "path": "/stores/{storeId}/customers/{customerId}", + "summary": "Get customer by ID", + "description": "Retrieve the information of a single customer using the store and customer IDs.", + "parameters": [ + { + "name": "customerId", + "in": "path", + "required": true, + "description": "The id of the specific customer", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "storeId", + "in": "path", + "required": true, + "description": "An identifier for a store", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Request was successful", + "schema": { + "allOf": [ + { + "allOf": [ + { + "description": "Customer identifier that is unique within current Store", + "type": "object", + "properties": { + "customerId": { + "type": "string", + "format": "uuid" + } + } + }, + { + "type": "object", + "required": [ + "firstName", + "lastName", + "email", + "phone" + ], + "properties": { + "firstName": { + "type": "string", + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\@&' ]*$", + "example": "Fredrick", + "maxLength": 50 + }, + "lastName": { + "type": "string", + "example": "Smith", + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\@&' ]*$", + "maxLength": 50 + }, + "organization": { + "type": "string", + "format": "organization-name", + "example": "GoDaddy", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\\\@&!' +]*$" + }, + "jobTitle": { + "type": "string" + }, + "nickname": { + "description": "Name by which customer should be addressed", + "type": "string", + "example": "Fred", + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\@&' ]*$", + "maxLength": 50 + }, + "addresses": { + "description": "Array of customer addresses. Note that currently only one address is supported", + "items": { + "type": "object", + "properties": { + "address1": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "address2": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "city": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "state": { + "type": "string", + "description": "State or province or territory", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "postalCode": { + "type": "string", + "description": "Postal or zip code", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "country": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,2}$", + "description": "Country ISO code" + }, + "label": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$", + "description": "A descriptive name for the address" + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "emails": { + "description": "Array of email addresses", + "items": { + "required": [ + "email" + ], + "properties": { + "email": { + "$id": "https://godaddy.com/schemas/common/email-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A valid, internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.", + "type": "string", + "minLength": 3, + "maxLength": 254, + "pattern": "^.+@[^\"\\-].+$" + }, + "label": { + "description": "A user provided name for the email address", + "type": "string", + "maxLength": 255 + }, + "default": { + "description": "Indicates whether the email is the primary email.", + "type": "boolean" + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "instantMessages": { + "description": "Array of instant messaging accounts associated with the customer", + "items": { + "required": [ + "accountKey" + ], + "properties": { + "accountKey": { + "description": "An accountKey for the instant messaging account", + "type": "string", + "maxLength": 255 + }, + "label": { + "description": "A user provided name for the external service", + "type": "string", + "maxLength": 255 + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "socialProfiles": { + "description": "Array of social profiles associated with the customer", + "items": { + "required": [ + "accountKey" + ], + "properties": { + "accountKey": { + "description": "An accountKey for the social profile", + "type": "string", + "maxLength": 255 + }, + "label": { + "description": "A user provided name for the external service", + "type": "string", + "maxLength": 255 + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "phones": { + "description": "Array of phone numbers", + "items": { + "type": "object", + "required": [ + "phone" + ], + "properties": { + "phone": { + "description": "A customer phone number", + "type": "string", + "format": "phone", + "maxLength": 17 + }, + "label": { + "description": "A user provided name for the phone number", + "type": "string", + "maxLength": 255 + }, + "default": { + "description": "Indicates whether the phone is the primary phone.", + "type": "boolean" + } + } + }, + "default": [], + "type": "array", + "maxLength": 10 + }, + "urls": { + "description": "Array of urls associated with the customer", + "items": { + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A url associated with the customer", + "type": "string", + "format": "url", + "maxLength": 2083 + }, + "label": { + "description": "A user provided name for the url", + "type": "string", + "maxLength": 255 + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + } + } + } + ] + }, + { + "type": "object", + "required": [ + "updatedAt" + ], + "properties": { + "updatedAt": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + }, + { + "required": [ + "listKeys" + ], + "properties": { + "listKeys": { + "description": "List memberships that should be changed for the customer", + "items": { + "type": "string", + "format": "uuid" + }, + "type": "array" + } + } + }, + { + "type": "object", + "required": [ + "customerId" + ], + "properties": { + "joined": { + "description": "Whether the customer has been joined with one or more other customers to create a single customer", + "type": "boolean", + "default": false + }, + "trackingDisabled": { + "description": "Whether the customer has opted out of tracking (eg. email opens and link clicks)", + "type": "boolean", + "default": false + }, + "orderCount": { + "description": "Number of orders the customer has made", + "type": "integer", + "minimum": 0 + }, + "profileImageUrl": { + "description": "Url of the profile images for the customer", + "type": "string", + "format": "url" + }, + "paymentCount": { + "description": "Number of payments the customer has completed", + "type": "integer", + "minimum": 0 + } + } + } + ] + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "429": { + "description": "Too many requests received within interval", + "schema": { + "x-error-model": true, + "additionalProperties": false, + "allOf": [ + { + "type": "object", + "properties": { + "retryAfterSec": { + "type": "integer", + "format": "integer-positive", + "pattern": "^[0-9]+$", + "description": "Number of seconds to wait before attempting a similar request" + } + }, + "required": [ + "retryAfterSec" + ] + }, + { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + } + }, + "scopes": [ + "commerce.customer:read" + ] + }, + { + "operationId": "DeleteCustomer", + "method": "DELETE", + "path": "/stores/{storeId}/customers/{customerId}", + "summary": "Delete customer by ID", + "description": "Delete the information a single customer using the store and customer IDs.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "An identifier for a store", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "customerId", + "in": "path", + "required": true, + "description": "The id of the specific customer", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "202": { + "description": "A Delete action was successfully created", + "schema": { + "type": "object", + "properties": { + "links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "method": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + }, + "required": [ + "links" + ] + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "429": { + "description": "Too many requests received within interval", + "schema": { + "x-error-model": true, + "additionalProperties": false, + "allOf": [ + { + "type": "object", + "properties": { + "retryAfterSec": { + "type": "integer", + "format": "integer-positive", + "pattern": "^[0-9]+$", + "description": "Number of seconds to wait before attempting a similar request" + } + }, + "required": [ + "retryAfterSec" + ] + }, + { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + } + }, + "scopes": [ + "commerce.customer:update" + ] + }, + { + "operationId": "CommerceCustomerJoin", + "method": "POST", + "path": "/stores/{storeId}/customer-join", + "summary": "Join customers", + "description": "This endpoint can be used to combine two or more customers together to create a single customer. The customer with the most complete basic attributes such as name, organization, and job title will be selected as the primary customer, and any attributes from the other customers will be reverse merged into the primary customer.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "An identifier for a store", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "description": "Customer IDs", + "contentType": "application/json", + "schema": { + "type": "object", + "required": [ + "customerIds" + ], + "properties": { + "customerIds": { + "description": "Array of Customer IDs to join", + "type": "array", + "minItems": 2, + "maxItems": 50, + "items": { + "type": "string", + "format": "uuid" + } + } + } + } + }, + "responses": { + "202": { + "description": "A Join Customers action was successfully created", + "schema": { + "type": "object", + "properties": { + "links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "method": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + }, + "required": [ + "links" + ] + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "429": { + "description": "Too many requests received within interval", + "schema": { + "x-error-model": true, + "additionalProperties": false, + "allOf": [ + { + "type": "object", + "properties": { + "retryAfterSec": { + "type": "integer", + "format": "integer-positive", + "pattern": "^[0-9]+$", + "description": "Number of seconds to wait before attempting a similar request" + } + }, + "required": [ + "retryAfterSec" + ] + }, + { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + } + }, + "scopes": [ + "commerce.customer:update" + ] + }, + { + "operationId": "CommerceCustomerUnjoin", + "method": "POST", + "path": "/stores/{storeId}/customers/{customerId}/customer-unjoin", + "summary": "Separate joined customers", + "description": "This endpoint can be used to undo all previous customer joins for a specific customer. Previously joined customers will now be available as individual customers.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "An identifier for a store", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "customerId", + "in": "path", + "required": true, + "description": "The id of the specific customer", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "202": { + "description": "An Unjoin Customers action was successfully created", + "schema": { + "type": "object", + "properties": { + "links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "method": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + }, + "required": [ + "links" + ] + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "429": { + "description": "Too many requests received within interval", + "schema": { + "x-error-model": true, + "additionalProperties": false, + "allOf": [ + { + "type": "object", + "properties": { + "retryAfterSec": { + "type": "integer", + "format": "integer-positive", + "pattern": "^[0-9]+$", + "description": "Number of seconds to wait before attempting a similar request" + } + }, + "required": [ + "retryAfterSec" + ] + }, + { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + } + }, + "scopes": [ + "commerce.customer:update" + ] + }, + { + "operationId": "GetRequest", + "method": "GET", + "path": "/stores/{storeId}/customer-requests/{requestId}", + "summary": "Get customer request by ID", + "description": "This endpoint can be used to retrieve a customer request using the store and request ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "An identifier for a store", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "requestId", + "in": "path", + "required": true, + "description": "Request identifier", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "allOf": [ + { + "type": "object", + "required": [ + "requestId" + ], + "properties": { + "requestId": { + "type": "string", + "format": "uuid" + } + } + }, + { + "required": [ + "status" + ], + "type": "object", + "properties": { + "undoSupport": { + "type": "boolean", + "description": "Whether or not the request can be undone automatically" + }, + "status": { + "type": "string", + "description": "The possible statuses an action can be in", + "enum": [ + "FAILED", + "PARTIAL_SUCCESS", + "PENDING", + "SUCCESS" + ] + }, + "errors": { + "type": "array", + "items": { + "allOf": [ + { + "description": "Customer identifier that is unique within current Store", + "type": "object", + "properties": { + "customerId": { + "type": "string", + "format": "uuid" + } + } + }, + { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + ] + } + }, + "customerIds": { + "description": "IDs of the customer records affected - created or updated - by the request", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "links": { + "description": "HATEOAS link relations", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } + } + ] + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "429": { + "description": "Too many requests received within interval", + "schema": { + "x-error-model": true, + "additionalProperties": false, + "allOf": [ + { + "type": "object", + "properties": { + "retryAfterSec": { + "type": "integer", + "format": "integer-positive", + "pattern": "^[0-9]+$", + "description": "Number of seconds to wait before attempting a similar request" + } + }, + "required": [ + "retryAfterSec" + ] + }, + { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + } + }, + "scopes": [ + "commerce.customer:create", + "commerce.customer:update" + ] + }, + { + "operationId": "commerceCustomerCreateActivity", + "method": "POST", + "path": "/stores/{storeId}/customer-activities", + "summary": "Create customer activity", + "description": "This endpoint can be used to create an actvity for a specific customer using the store ID. Customer activities are the series of actions a customer can perform such as orders, bookings, and payments, which can be tracked for further analysis. Customer data will only be added when the customer does not yet exist.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "An identifier for a store", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "description": "Activity and contact data", + "contentType": "application/json", + "schema": { + "type": "object", + "required": [ + "activity", + "customer" + ], + "properties": { + "activity": { + "description": "Data about the activity", + "type": "object", + "required": [ + "source", + "type" + ], + "properties": { + "source": { + "description": "Source application of the interaction", + "type": "string", + "enum": [ + "COMMERCE", + "CONVERSATIONS", + "EMAIL_MARKETING", + "GDSOCIAL", + "GOPAY", + "INVOICE", + "POYNT", + "ONLINE_APPOINTMENTS", + "ONLINE_STORE", + "PAYMENTS", + "WEBSITE_BUILDER" + ] + }, + "type": { + "type": "string", + "description": "The type of activity to associate with the customer", + "enum": [ + "BOOKING_CLAIMED", + "BOOKING_CREATED", + "BOOKING_RESCHEDULED", + "ORDER_CREATED", + "PAYMENT_COMPLETED", + "PAYMENT_REFUNDED", + "PAYMENT_VOIDED" + ] + } + } + }, + "customer": { + "description": "Customer data regarding the customer who performed the activity. Customer data will only be added when the customer does not yet exist.", + "type": "object", + "allOf": [ + { + "allOf": [ + { + "description": "Customer identifier that is unique within current Store", + "type": "object", + "properties": { + "customerId": { + "type": "string", + "format": "uuid" + } + } + }, + { + "type": "object", + "required": [ + "firstName", + "lastName", + "email", + "phone" + ], + "properties": { + "firstName": { + "type": "string", + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\@&' ]*$", + "example": "Fredrick", + "maxLength": 50 + }, + "lastName": { + "type": "string", + "example": "Smith", + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\@&' ]*$", + "maxLength": 50 + }, + "organization": { + "type": "string", + "format": "organization-name", + "example": "GoDaddy", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\\\@&!' +]*$" + }, + "jobTitle": { + "type": "string" + }, + "nickname": { + "description": "Name by which customer should be addressed", + "type": "string", + "example": "Fred", + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,\\(\\)\\@&' ]*$", + "maxLength": 50 + }, + "addresses": { + "description": "Array of customer addresses. Note that currently only one address is supported", + "items": { + "type": "object", + "properties": { + "address1": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "address2": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "city": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "state": { + "type": "string", + "description": "State or province or territory", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "postalCode": { + "type": "string", + "description": "Postal or zip code", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$" + }, + "country": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,2}$", + "description": "Country ISO code" + }, + "label": { + "type": "string", + "maxLength": 100, + "pattern": "^[\\u0080-\\uFFFFa-zA-Z0-9\\-.,'#*@/& ]{,100}$", + "description": "A descriptive name for the address" + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "emails": { + "description": "Array of email addresses", + "items": { + "required": [ + "email" + ], + "properties": { + "email": { + "$id": "https://godaddy.com/schemas/common/email-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A valid, internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.", + "type": "string", + "minLength": 3, + "maxLength": 254, + "pattern": "^.+@[^\"\\-].+$" + }, + "label": { + "description": "A user provided name for the email address", + "type": "string", + "maxLength": 255 + }, + "default": { + "description": "Indicates whether the email is the primary email.", + "type": "boolean" + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "instantMessages": { + "description": "Array of instant messaging accounts associated with the customer", + "items": { + "required": [ + "accountKey" + ], + "properties": { + "accountKey": { + "description": "An accountKey for the instant messaging account", + "type": "string", + "maxLength": 255 + }, + "label": { + "description": "A user provided name for the external service", + "type": "string", + "maxLength": 255 + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "socialProfiles": { + "description": "Array of social profiles associated with the customer", + "items": { + "required": [ + "accountKey" + ], + "properties": { + "accountKey": { + "description": "An accountKey for the social profile", + "type": "string", + "maxLength": 255 + }, + "label": { + "description": "A user provided name for the external service", + "type": "string", + "maxLength": 255 + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + }, + "phones": { + "description": "Array of phone numbers", + "items": { + "type": "object", + "required": [ + "phone" + ], + "properties": { + "phone": { + "description": "A customer phone number", + "type": "string", + "format": "phone", + "maxLength": 17 + }, + "label": { + "description": "A user provided name for the phone number", + "type": "string", + "maxLength": 255 + }, + "default": { + "description": "Indicates whether the phone is the primary phone.", + "type": "boolean" + } + } + }, + "default": [], + "type": "array", + "maxLength": 10 + }, + "urls": { + "description": "Array of urls associated with the customer", + "items": { + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A url associated with the customer", + "type": "string", + "format": "url", + "maxLength": 2083 + }, + "label": { + "description": "A user provided name for the url", + "type": "string", + "maxLength": 255 + } + } + }, + "type": "array", + "maxLength": 10, + "default": [] + } + } + } + ] + }, + { + "type": "object", + "properties": { + "externalIdentifier": { + "type": "object", + "properties": { + "externalId": { + "description": "The external id for the customer in another service", + "type": "string", + "maxLength": 255 + }, + "source": { + "description": "The name of service from which the external id originates", + "type": "string", + "example": "INVOICE", + "maxLength": 255 + } + }, + "required": [ + "externalId", + "source" + ] + } + } + }, + { + "required": [ + "listKeys" + ], + "properties": { + "listKeys": { + "description": "List memberships that should be changed for the customer", + "items": { + "type": "string", + "format": "uuid" + }, + "type": "array" + } + } + } + ] + } + } + } + }, + "responses": { + "204": { + "description": "An activity for the given contact has been created" + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "x-error-model": true, + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.activity", + "description": "1) JSONPath referring to the field within the data containing an error
or
2) JSONPath referring to an object containing an error" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "pattern": "^[a-z_]([a-zA-Z0-9_.]*)*$", + "example": "$.type", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + }, + "required": [ + "path", + "code" + ] + }, + "minItems": 1, + "description": "List of the specific fields, and the errors found with their contents" + }, + "stack": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "Stack trace indicating where the error occurred.
NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems" + } + }, + "required": [ + "code" + ] + } + } + }, + "scopes": [ + "commerce.customer:create" + ] + } + ] +} \ No newline at end of file diff --git a/src/cli/schemas/api/fulfillments.json b/src/cli/schemas/api/fulfillments.json index be7b298..b46f63a 100644 --- a/src/cli/schemas/api/fulfillments.json +++ b/src/cli/schemas/api/fulfillments.json @@ -18,7 +18,9 @@ "required": true, "description": "Store ID", "schema": { - "$ref": "./models/FulfillmentPlan.yaml#/properties/storeId" + "type": "string", + "description": "ID of the store that the fulfillment plan belongs to", + "example": "6863480a-d0cb-46b5-8560-cd97d2c72d35" } } ], @@ -27,7 +29,691 @@ "description": "The fulfillment object to create", "contentType": "application/json", "schema": { - "$ref": "./models/FulfillmentConditionals.yaml" + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-conditionals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Conditionals", + "type": "object", + "description": "Schema for fulfillment with conditional validation constraints. The detailedStatus field is required for all fulfillment operations (both create and update) and must be valid for the initial status being set during creation.", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment", + "type": "object", + "description": "A fulfillment represents a task to fulfill one or more items from a single location for a single fulfillment mode. A Fulfillment can exist in the context of an order or be independent of one.", + "required": [ + "id", + "storeId", + "mode", + "status", + "detailedStatus", + "locationId", + "items" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fulfillment (`Fulfillment_`). Auto-generated by our system on creation", + "readOnly": true, + "example": "Fulfillment_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for the fulfillment", + "example": "FM-Y6BN43DB590L" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the fulfillment belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "orderId": { + "type": "string", + "description": "Reference to an order as defined by the Orders Service", + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "fulfillmentPlanId": { + "type": "string", + "description": "Reference to the FulfillmentPlan this fulfillment was created from. Used for linking and reporting.", + "example": "FulfillmentPlan_TG41sWEXyIktH8PY4eI0nOGDoB6" + }, + "mode": { + "description": "The mode for the fulfillment", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment mode", + "type": "string", + "enum": [ + "SHIP", + "DELIVERY", + "PICKUP", + "FOR_HERE", + "DIGITAL" + ] + }, + "status": { + "description": "The current status for the fulfillment", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment status", + "type": "string", + "enum": [ + "IN_PROGRESS", + "SUCCESS", + "CANCELED", + "ERROR" + ] + }, + "detailedStatus": { + "description": "The detailed status for the fulfillment providing more granular information about the fulfillment state. This field is required for all fulfillment operations. For updates: must be present and be one of the valid detailed statuses. For creates: must be present and valid for the initial status being set (see fulfillment-constraints.json for validation rules).", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment detailed status", + "type": "string", + "enum": [ + "ERROR", + "CANCELED", + "CONFIRMED", + "AWAITING_FULFILLMENT", + "OUT_FOR_FULFILLMENT", + "ATTEMPTED_FULFILLMENT", + "SUCCESS", + "AWAITING_PICKUP" + ] + }, + "locationId": { + "type": "string", + "description": "Reference to the Inventory Location (as defined by the Inventory Service) where the fulfillment was processed at" + }, + "origin": { + "description": "Origin address information for the fulfillment. Typically this is the address of the warehouse or fulfillment center (e.g. Location)", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Address", + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The address details", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + }, + "destination": { + "description": "Destination address information for the fulfillment", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Address", + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The address details", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + }, + "inventoryBehavior": { + "type": "string", + "description": "Inventory policy for this fulfillment. Valid values: OBEY_POLICY (default), BYPASS. OBEY_POLICY decrements inventory and enforces stock checks; BYPASS skips inventory checks and allows fulfillment regardless of stock.", + "enum": [ + "OBEY_POLICY", + "BYPASS" + ], + "default": "OBEY_POLICY" + }, + "fulfillmentWindow": { + "description": "FulfillmentWindow object specifying the time window for fulfillment (e.g., delivery slot).", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-window.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Window", + "type": "object", + "required": [ + "startAt", + "endAt" + ], + "properties": { + "startAt": { + "description": "Start of the fulfillment window. Used for scheduling and SLA tracking.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "endAt": { + "description": "End of the fulfillment window. Used for scheduling and SLA tracking.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + }, + "notes": { + "type": "array", + "description": "List of FulfillmentNote objects, used for internal or customer-facing notes.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Note", + "type": "object", + "description": "Represents a note attached to a fulfillment, which may be customer-facing or internal", + "required": [ + "id", + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the note. Used for referencing and editing notes." + }, + "content": { + "type": "string", + "description": "The note content, which may be customer-facing or internal." + }, + "author": { + "type": "string", + "description": "Name or identifier of the note's author." + }, + "authorType": { + "type": "string", + "description": "Type of author. Used for filtering and display. Defaults to CUSTOMER.", + "enum": [ + "CUSTOMER", + "MERCHANT", + "NONE" + ], + "default": "CUSTOMER" + }, + "createdAt": { + "description": "When the note was created. Used for ordering and audit.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "When the note was last updated. Used for audit and concurrency control.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "items": { + "type": "array", + "description": "Items in the fulfillment", + "minItems": 1, + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Item", + "type": "object", + "description": "Represents an item that's included in a fulfillment / fulfillment plan", + "required": [ + "quantity", + "name" + ], + "properties": { + "quantity": { + "type": "number", + "description": "Quantity for the fulfillment item. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "name": { + "type": "string", + "description": "Name of the fulfillment item used for display purposes" + }, + "sku": { + "type": "string", + "description": "SKU for the fulfillment item. Optional. Deprecated in v2" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the Catalog service (commerce API v2). Optional." + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the Catalog service (commerce API v1). Optional." + }, + "lineItemId": { + "type": "string", + "description": "Reference to a Line Item as defined by the Order service. Optional since fulfillments do not have to be tied to an order." + }, + "fulfillmentPlanItemId": { + "type": "string", + "description": "Reference to the FulfillmentPlanItem this item fulfills. Required if the fulfillment is linked to a plan." + } + } + } + }, + "trackingData": { + "type": "array", + "description": "Tracking information for a fulfillment. The ability to have multiple tracking numbers for a single fulfillment is to support `last mile` shipping use cases. We do not support fulfilling multiple discrete sets of items (e.g. multiple boxes) in a single fulfillment", + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/tracking.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tracking", + "type": "object", + "description": "Groups together relevant details about tracking a fulfillment. Typically represents a shipping label for a service like USPS", + "required": [ + "number" + ], + "properties": { + "labelId": { + "type": "string", + "description": "Reference to a Label as defined by the Label Service" + }, + "number": { + "type": "string", + "description": "The tracking number", + "example": "U897654321345678" + }, + "url": { + "type": "string", + "description": "The tracking URL", + "example": "http://www.ups.com/WebTracking/track?trackNums=U897654321345678&track.x=Track" + }, + "provider": { + "type": "string", + "description": "Tracking provider (`UPS`, `USPS`, etc.)" + }, + "service": { + "type": "string", + "description": "Tracking provider (`2nd Day`, `Priority`, `Express` etc.)" + } + } + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to the fulfillment", + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to a fulfillment / fulfillment plan", + "required": [ + "eventName", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "FULFILLMENT.CANCELED" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the fulfillment was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the fulfillment was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-constraints.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Constraints", + "type": "object", + "description": "Validation constraints for a fulfillment", + "properties": { + "status": { + "type": "string", + "description": "Valid statuses for fulfillment operations", + "enum": [ + "IN_PROGRESS", + "SUCCESS" + ] + }, + "detailedStatus": { + "type": "string", + "description": "Valid detailed statuses for fulfillment operations based on status", + "anyOf": [ + { + "description": "Valid detailed statuses when status is IN_PROGRESS", + "enum": [ + "CONFIRMED", + "AWAITING_FULFILLMENT", + "OUT_FOR_FULFILLMENT", + "ATTEMPTED_FULFILLMENT", + "AWAITING_PICKUP" + ] + }, + { + "description": "Valid detailed statuses when status is SUCCESS", + "enum": [ + "SUCCESS" + ] + } + ] + } + }, + "if": { + "properties": { + "status": { + "const": "IN_PROGRESS" + } + } + }, + "then": { + "properties": { + "detailedStatus": { + "enum": [ + "CONFIRMED", + "AWAITING_FULFILLMENT", + "OUT_FOR_FULFILLMENT", + "ATTEMPTED_FULFILLMENT", + "AWAITING_PICKUP" + ] + } + } + }, + "else": { + "if": { + "properties": { + "status": { + "const": "SUCCESS" + } + } + }, + "then": { + "properties": { + "detailedStatus": { + "enum": [ + "SUCCESS" + ] + } + } + } + } + } + ] } }, "responses": { @@ -35,7 +721,10 @@ "description": "Successfully created the fulfillment", "schema": { "type": "object", - "required": ["status", "fulfillment"], + "required": [ + "status", + "fulfillment" + ], "properties": { "status": { "type": "string", @@ -43,37 +732,1193 @@ "example": "success" }, "fulfillment": { - "$ref": "#/components/schemas/Fulfillment" + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment", + "type": "object", + "description": "A fulfillment represents a task to fulfill one or more items from a single location for a single fulfillment mode. A Fulfillment can exist in the context of an order or be independent of one.", + "required": [ + "id", + "storeId", + "mode", + "status", + "detailedStatus", + "locationId", + "items" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fulfillment (`Fulfillment_`). Auto-generated by our system on creation", + "readOnly": true, + "example": "Fulfillment_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for the fulfillment", + "example": "FM-Y6BN43DB590L" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the fulfillment belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "orderId": { + "type": "string", + "description": "Reference to an order as defined by the Orders Service", + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "fulfillmentPlanId": { + "type": "string", + "description": "Reference to the FulfillmentPlan this fulfillment was created from. Used for linking and reporting.", + "example": "FulfillmentPlan_TG41sWEXyIktH8PY4eI0nOGDoB6" + }, + "mode": { + "description": "The mode for the fulfillment", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment mode", + "type": "string", + "enum": [ + "SHIP", + "DELIVERY", + "PICKUP", + "FOR_HERE", + "DIGITAL" + ] + }, + "status": { + "description": "The current status for the fulfillment", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment status", + "type": "string", + "enum": [ + "IN_PROGRESS", + "SUCCESS", + "CANCELED", + "ERROR" + ] + }, + "detailedStatus": { + "description": "The detailed status for the fulfillment providing more granular information about the fulfillment state. This field is required for all fulfillment operations. For updates: must be present and be one of the valid detailed statuses. For creates: must be present and valid for the initial status being set (see fulfillment-constraints.json for validation rules).", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment detailed status", + "type": "string", + "enum": [ + "ERROR", + "CANCELED", + "CONFIRMED", + "AWAITING_FULFILLMENT", + "OUT_FOR_FULFILLMENT", + "ATTEMPTED_FULFILLMENT", + "SUCCESS", + "AWAITING_PICKUP" + ] + }, + "locationId": { + "type": "string", + "description": "Reference to the Inventory Location (as defined by the Inventory Service) where the fulfillment was processed at" + }, + "origin": { + "description": "Origin address information for the fulfillment. Typically this is the address of the warehouse or fulfillment center (e.g. Location)", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Address", + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The address details", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + }, + "destination": { + "description": "Destination address information for the fulfillment", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Address", + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The address details", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + }, + "inventoryBehavior": { + "type": "string", + "description": "Inventory policy for this fulfillment. Valid values: OBEY_POLICY (default), BYPASS. OBEY_POLICY decrements inventory and enforces stock checks; BYPASS skips inventory checks and allows fulfillment regardless of stock.", + "enum": [ + "OBEY_POLICY", + "BYPASS" + ], + "default": "OBEY_POLICY" + }, + "fulfillmentWindow": { + "description": "FulfillmentWindow object specifying the time window for fulfillment (e.g., delivery slot).", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-window.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Window", + "type": "object", + "required": [ + "startAt", + "endAt" + ], + "properties": { + "startAt": { + "description": "Start of the fulfillment window. Used for scheduling and SLA tracking.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "endAt": { + "description": "End of the fulfillment window. Used for scheduling and SLA tracking.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + }, + "notes": { + "type": "array", + "description": "List of FulfillmentNote objects, used for internal or customer-facing notes.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Note", + "type": "object", + "description": "Represents a note attached to a fulfillment, which may be customer-facing or internal", + "required": [ + "id", + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the note. Used for referencing and editing notes." + }, + "content": { + "type": "string", + "description": "The note content, which may be customer-facing or internal." + }, + "author": { + "type": "string", + "description": "Name or identifier of the note's author." + }, + "authorType": { + "type": "string", + "description": "Type of author. Used for filtering and display. Defaults to CUSTOMER.", + "enum": [ + "CUSTOMER", + "MERCHANT", + "NONE" + ], + "default": "CUSTOMER" + }, + "createdAt": { + "description": "When the note was created. Used for ordering and audit.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "When the note was last updated. Used for audit and concurrency control.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "items": { + "type": "array", + "description": "Items in the fulfillment", + "minItems": 1, + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Item", + "type": "object", + "description": "Represents an item that's included in a fulfillment / fulfillment plan", + "required": [ + "quantity", + "name" + ], + "properties": { + "quantity": { + "type": "number", + "description": "Quantity for the fulfillment item. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "name": { + "type": "string", + "description": "Name of the fulfillment item used for display purposes" + }, + "sku": { + "type": "string", + "description": "SKU for the fulfillment item. Optional. Deprecated in v2" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the Catalog service (commerce API v2). Optional." + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the Catalog service (commerce API v1). Optional." + }, + "lineItemId": { + "type": "string", + "description": "Reference to a Line Item as defined by the Order service. Optional since fulfillments do not have to be tied to an order." + }, + "fulfillmentPlanItemId": { + "type": "string", + "description": "Reference to the FulfillmentPlanItem this item fulfills. Required if the fulfillment is linked to a plan." + } + } + } + }, + "trackingData": { + "type": "array", + "description": "Tracking information for a fulfillment. The ability to have multiple tracking numbers for a single fulfillment is to support `last mile` shipping use cases. We do not support fulfilling multiple discrete sets of items (e.g. multiple boxes) in a single fulfillment", + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/tracking.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tracking", + "type": "object", + "description": "Groups together relevant details about tracking a fulfillment. Typically represents a shipping label for a service like USPS", + "required": [ + "number" + ], + "properties": { + "labelId": { + "type": "string", + "description": "Reference to a Label as defined by the Label Service" + }, + "number": { + "type": "string", + "description": "The tracking number", + "example": "U897654321345678" + }, + "url": { + "type": "string", + "description": "The tracking URL", + "example": "http://www.ups.com/WebTracking/track?trackNums=U897654321345678&track.x=Track" + }, + "provider": { + "type": "string", + "description": "Tracking provider (`UPS`, `USPS`, etc.)" + }, + "service": { + "type": "string", + "description": "Tracking provider (`2nd Day`, `Priority`, `Express` etc.)" + } + } + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to the fulfillment", + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to a fulfillment / fulfillment plan", + "required": [ + "eventName", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "FULFILLMENT.CANCELED" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the fulfillment was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the fulfillment was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } } } } }, "401": { - "description": "See #/components/responses/401" + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "403": { - "description": "See #/components/responses/403" + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "404": { - "description": "See #/components/responses/404" + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "409": { - "description": "See #/components/responses/409" + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "422": { - "description": "See #/components/responses/422" + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "500": { - "description": "See #/components/responses/500" + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "502": { - "description": "See #/components/responses/502" + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "503": { - "description": "See #/components/responses/503" + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "504": { - "description": "See #/components/responses/504" + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } } }, "scopes": [] @@ -91,7 +1936,9 @@ "required": true, "description": "Store ID", "schema": { - "$ref": "./models/FulfillmentPlan.yaml#/properties/storeId" + "type": "string", + "description": "ID of the store that the fulfillment plan belongs to", + "example": "6863480a-d0cb-46b5-8560-cd97d2c72d35" } }, { @@ -100,7 +1947,10 @@ "required": true, "description": "The ID of the fulfillment", "schema": { - "$ref": "./models/Fulfillment.yaml#/properties/id" + "type": "string", + "description": "An identifier unique to the fulfillment (`Fulfillment_`). Auto-generated by our system on creation", + "readOnly": true, + "example": "Fulfillment_2G5VsWEFhIktH8PY4qC0iOGDpVJ" } } ], @@ -109,7 +1959,605 @@ "description": "The fulfillment object to patch", "contentType": "application/json", "schema": { - "$ref": "./models/Fulfillment.yaml" + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment", + "type": "object", + "description": "A fulfillment represents a task to fulfill one or more items from a single location for a single fulfillment mode. A Fulfillment can exist in the context of an order or be independent of one.", + "required": [ + "id", + "storeId", + "mode", + "status", + "detailedStatus", + "locationId", + "items" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fulfillment (`Fulfillment_`). Auto-generated by our system on creation", + "readOnly": true, + "example": "Fulfillment_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for the fulfillment", + "example": "FM-Y6BN43DB590L" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the fulfillment belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "orderId": { + "type": "string", + "description": "Reference to an order as defined by the Orders Service", + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "fulfillmentPlanId": { + "type": "string", + "description": "Reference to the FulfillmentPlan this fulfillment was created from. Used for linking and reporting.", + "example": "FulfillmentPlan_TG41sWEXyIktH8PY4eI0nOGDoB6" + }, + "mode": { + "description": "The mode for the fulfillment", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment mode", + "type": "string", + "enum": [ + "SHIP", + "DELIVERY", + "PICKUP", + "FOR_HERE", + "DIGITAL" + ] + }, + "status": { + "description": "The current status for the fulfillment", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment status", + "type": "string", + "enum": [ + "IN_PROGRESS", + "SUCCESS", + "CANCELED", + "ERROR" + ] + }, + "detailedStatus": { + "description": "The detailed status for the fulfillment providing more granular information about the fulfillment state. This field is required for all fulfillment operations. For updates: must be present and be one of the valid detailed statuses. For creates: must be present and valid for the initial status being set (see fulfillment-constraints.json for validation rules).", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment detailed status", + "type": "string", + "enum": [ + "ERROR", + "CANCELED", + "CONFIRMED", + "AWAITING_FULFILLMENT", + "OUT_FOR_FULFILLMENT", + "ATTEMPTED_FULFILLMENT", + "SUCCESS", + "AWAITING_PICKUP" + ] + }, + "locationId": { + "type": "string", + "description": "Reference to the Inventory Location (as defined by the Inventory Service) where the fulfillment was processed at" + }, + "origin": { + "description": "Origin address information for the fulfillment. Typically this is the address of the warehouse or fulfillment center (e.g. Location)", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Address", + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The address details", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + }, + "destination": { + "description": "Destination address information for the fulfillment", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Address", + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The address details", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + }, + "inventoryBehavior": { + "type": "string", + "description": "Inventory policy for this fulfillment. Valid values: OBEY_POLICY (default), BYPASS. OBEY_POLICY decrements inventory and enforces stock checks; BYPASS skips inventory checks and allows fulfillment regardless of stock.", + "enum": [ + "OBEY_POLICY", + "BYPASS" + ], + "default": "OBEY_POLICY" + }, + "fulfillmentWindow": { + "description": "FulfillmentWindow object specifying the time window for fulfillment (e.g., delivery slot).", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-window.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Window", + "type": "object", + "required": [ + "startAt", + "endAt" + ], + "properties": { + "startAt": { + "description": "Start of the fulfillment window. Used for scheduling and SLA tracking.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "endAt": { + "description": "End of the fulfillment window. Used for scheduling and SLA tracking.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + }, + "notes": { + "type": "array", + "description": "List of FulfillmentNote objects, used for internal or customer-facing notes.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Note", + "type": "object", + "description": "Represents a note attached to a fulfillment, which may be customer-facing or internal", + "required": [ + "id", + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the note. Used for referencing and editing notes." + }, + "content": { + "type": "string", + "description": "The note content, which may be customer-facing or internal." + }, + "author": { + "type": "string", + "description": "Name or identifier of the note's author." + }, + "authorType": { + "type": "string", + "description": "Type of author. Used for filtering and display. Defaults to CUSTOMER.", + "enum": [ + "CUSTOMER", + "MERCHANT", + "NONE" + ], + "default": "CUSTOMER" + }, + "createdAt": { + "description": "When the note was created. Used for ordering and audit.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "When the note was last updated. Used for audit and concurrency control.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "items": { + "type": "array", + "description": "Items in the fulfillment", + "minItems": 1, + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Item", + "type": "object", + "description": "Represents an item that's included in a fulfillment / fulfillment plan", + "required": [ + "quantity", + "name" + ], + "properties": { + "quantity": { + "type": "number", + "description": "Quantity for the fulfillment item. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "name": { + "type": "string", + "description": "Name of the fulfillment item used for display purposes" + }, + "sku": { + "type": "string", + "description": "SKU for the fulfillment item. Optional. Deprecated in v2" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the Catalog service (commerce API v2). Optional." + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the Catalog service (commerce API v1). Optional." + }, + "lineItemId": { + "type": "string", + "description": "Reference to a Line Item as defined by the Order service. Optional since fulfillments do not have to be tied to an order." + }, + "fulfillmentPlanItemId": { + "type": "string", + "description": "Reference to the FulfillmentPlanItem this item fulfills. Required if the fulfillment is linked to a plan." + } + } + } + }, + "trackingData": { + "type": "array", + "description": "Tracking information for a fulfillment. The ability to have multiple tracking numbers for a single fulfillment is to support `last mile` shipping use cases. We do not support fulfilling multiple discrete sets of items (e.g. multiple boxes) in a single fulfillment", + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/tracking.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tracking", + "type": "object", + "description": "Groups together relevant details about tracking a fulfillment. Typically represents a shipping label for a service like USPS", + "required": [ + "number" + ], + "properties": { + "labelId": { + "type": "string", + "description": "Reference to a Label as defined by the Label Service" + }, + "number": { + "type": "string", + "description": "The tracking number", + "example": "U897654321345678" + }, + "url": { + "type": "string", + "description": "The tracking URL", + "example": "http://www.ups.com/WebTracking/track?trackNums=U897654321345678&track.x=Track" + }, + "provider": { + "type": "string", + "description": "Tracking provider (`UPS`, `USPS`, etc.)" + }, + "service": { + "type": "string", + "description": "Tracking provider (`2nd Day`, `Priority`, `Express` etc.)" + } + } + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to the fulfillment", + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to a fulfillment / fulfillment plan", + "required": [ + "eventName", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "FULFILLMENT.CANCELED" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the fulfillment was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the fulfillment was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } } }, "responses": { @@ -117,45 +2565,1204 @@ "description": "Successfully patched the fulfillment", "schema": { "type": "object", - "required": ["status", "fulfillment"], + "required": [ + "status", + "fulfillment" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "fulfillment": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment", + "type": "object", + "description": "A fulfillment represents a task to fulfill one or more items from a single location for a single fulfillment mode. A Fulfillment can exist in the context of an order or be independent of one.", + "required": [ + "id", + "storeId", + "mode", + "status", + "detailedStatus", + "locationId", + "items" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fulfillment (`Fulfillment_`). Auto-generated by our system on creation", + "readOnly": true, + "example": "Fulfillment_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for the fulfillment", + "example": "FM-Y6BN43DB590L" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the fulfillment belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "orderId": { + "type": "string", + "description": "Reference to an order as defined by the Orders Service", + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "fulfillmentPlanId": { + "type": "string", + "description": "Reference to the FulfillmentPlan this fulfillment was created from. Used for linking and reporting.", + "example": "FulfillmentPlan_TG41sWEXyIktH8PY4eI0nOGDoB6" + }, + "mode": { + "description": "The mode for the fulfillment", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment mode", + "type": "string", + "enum": [ + "SHIP", + "DELIVERY", + "PICKUP", + "FOR_HERE", + "DIGITAL" + ] + }, + "status": { + "description": "The current status for the fulfillment", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment status", + "type": "string", + "enum": [ + "IN_PROGRESS", + "SUCCESS", + "CANCELED", + "ERROR" + ] + }, + "detailedStatus": { + "description": "The detailed status for the fulfillment providing more granular information about the fulfillment state. This field is required for all fulfillment operations. For updates: must be present and be one of the valid detailed statuses. For creates: must be present and valid for the initial status being set (see fulfillment-constraints.json for validation rules).", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment detailed status", + "type": "string", + "enum": [ + "ERROR", + "CANCELED", + "CONFIRMED", + "AWAITING_FULFILLMENT", + "OUT_FOR_FULFILLMENT", + "ATTEMPTED_FULFILLMENT", + "SUCCESS", + "AWAITING_PICKUP" + ] + }, + "locationId": { + "type": "string", + "description": "Reference to the Inventory Location (as defined by the Inventory Service) where the fulfillment was processed at" + }, + "origin": { + "description": "Origin address information for the fulfillment. Typically this is the address of the warehouse or fulfillment center (e.g. Location)", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Address", + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The address details", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + }, + "destination": { + "description": "Destination address information for the fulfillment", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Address", + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The address details", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + }, + "inventoryBehavior": { + "type": "string", + "description": "Inventory policy for this fulfillment. Valid values: OBEY_POLICY (default), BYPASS. OBEY_POLICY decrements inventory and enforces stock checks; BYPASS skips inventory checks and allows fulfillment regardless of stock.", + "enum": [ + "OBEY_POLICY", + "BYPASS" + ], + "default": "OBEY_POLICY" + }, + "fulfillmentWindow": { + "description": "FulfillmentWindow object specifying the time window for fulfillment (e.g., delivery slot).", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-window.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Window", + "type": "object", + "required": [ + "startAt", + "endAt" + ], + "properties": { + "startAt": { + "description": "Start of the fulfillment window. Used for scheduling and SLA tracking.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "endAt": { + "description": "End of the fulfillment window. Used for scheduling and SLA tracking.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + }, + "notes": { + "type": "array", + "description": "List of FulfillmentNote objects, used for internal or customer-facing notes.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Note", + "type": "object", + "description": "Represents a note attached to a fulfillment, which may be customer-facing or internal", + "required": [ + "id", + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the note. Used for referencing and editing notes." + }, + "content": { + "type": "string", + "description": "The note content, which may be customer-facing or internal." + }, + "author": { + "type": "string", + "description": "Name or identifier of the note's author." + }, + "authorType": { + "type": "string", + "description": "Type of author. Used for filtering and display. Defaults to CUSTOMER.", + "enum": [ + "CUSTOMER", + "MERCHANT", + "NONE" + ], + "default": "CUSTOMER" + }, + "createdAt": { + "description": "When the note was created. Used for ordering and audit.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "When the note was last updated. Used for audit and concurrency control.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "items": { + "type": "array", + "description": "Items in the fulfillment", + "minItems": 1, + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Item", + "type": "object", + "description": "Represents an item that's included in a fulfillment / fulfillment plan", + "required": [ + "quantity", + "name" + ], + "properties": { + "quantity": { + "type": "number", + "description": "Quantity for the fulfillment item. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "name": { + "type": "string", + "description": "Name of the fulfillment item used for display purposes" + }, + "sku": { + "type": "string", + "description": "SKU for the fulfillment item. Optional. Deprecated in v2" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the Catalog service (commerce API v2). Optional." + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the Catalog service (commerce API v1). Optional." + }, + "lineItemId": { + "type": "string", + "description": "Reference to a Line Item as defined by the Order service. Optional since fulfillments do not have to be tied to an order." + }, + "fulfillmentPlanItemId": { + "type": "string", + "description": "Reference to the FulfillmentPlanItem this item fulfills. Required if the fulfillment is linked to a plan." + } + } + } + }, + "trackingData": { + "type": "array", + "description": "Tracking information for a fulfillment. The ability to have multiple tracking numbers for a single fulfillment is to support `last mile` shipping use cases. We do not support fulfilling multiple discrete sets of items (e.g. multiple boxes) in a single fulfillment", + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/tracking.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tracking", + "type": "object", + "description": "Groups together relevant details about tracking a fulfillment. Typically represents a shipping label for a service like USPS", + "required": [ + "number" + ], + "properties": { + "labelId": { + "type": "string", + "description": "Reference to a Label as defined by the Label Service" + }, + "number": { + "type": "string", + "description": "The tracking number", + "example": "U897654321345678" + }, + "url": { + "type": "string", + "description": "The tracking URL", + "example": "http://www.ups.com/WebTracking/track?trackNums=U897654321345678&track.x=Track" + }, + "provider": { + "type": "string", + "description": "Tracking provider (`UPS`, `USPS`, etc.)" + }, + "service": { + "type": "string", + "description": "Tracking provider (`2nd Day`, `Priority`, `Express` etc.)" + } + } + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to the fulfillment", + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to a fulfillment / fulfillment plan", + "required": [ + "eventName", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "FULFILLMENT.CANCELED" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the fulfillment was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the fulfillment was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], "properties": { - "status": { + "code": { "type": "string", - "description": "Status of the response", - "example": "success" + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" }, - "fulfillment": { - "$ref": "./models/Fulfillment.yaml" + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } } } } }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "409": { - "description": "See #/components/responses/409" - }, - "422": { - "description": "See #/components/responses/422" - }, - "500": { - "description": "See #/components/responses/500" - }, - "502": { - "description": "See #/components/responses/502" - }, - "503": { - "description": "See #/components/responses/503" - }, "504": { - "description": "See #/components/responses/504" + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } } }, "scopes": [] @@ -173,7 +3780,9 @@ "required": true, "description": "Store ID", "schema": { - "$ref": "./models/FulfillmentPlan.yaml#/properties/storeId" + "type": "string", + "description": "ID of the store that the fulfillment plan belongs to", + "example": "6863480a-d0cb-46b5-8560-cd97d2c72d35" } }, { @@ -182,7 +3791,9 @@ "required": true, "description": "Order ID", "schema": { - "$ref": "./models/FulfillmentPlan.yaml#/properties/orderId" + "type": "string", + "description": "Reference to an order as defined by the Orders Service", + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" } }, { @@ -202,7 +3813,10 @@ "description": "Successfully listed fulfillment plans", "schema": { "type": "object", - "required": ["status", "fulfillmentPlans"], + "required": [ + "status", + "fulfillmentPlans" + ], "properties": { "status": { "type": "string", @@ -215,7 +3829,520 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/FulfillmentPlan" + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-plan.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Plan", + "type": "object", + "description": "A fulfillment plan is a task list with instructions on how to fulfill a group of one or more items from an order from a single location for a single fulfillment mode. An order can have multiple fulfillment plans", + "required": [ + "id", + "storeId", + "orderId", + "mode", + "status", + "locationId", + "items" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fulfillment plan (`FulfillmentPlan_`). Auto-generated by our system on creation", + "readOnly": true, + "example": "FulfillmentPlan_TG41sWEXyIktH8PY4eI0nOGDoB6" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the fulfillment plan belongs to", + "example": "6863480a-d0cb-46b5-8560-cd97d2c72d35" + }, + "orderId": { + "type": "string", + "description": "Reference to an order as defined by the Orders Service", + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "cartId": { + "type": "string", + "description": "Optional reference to the cart associated with the order, if the order originated from a cart." + }, + "mode": { + "description": "The mode for the fulfillment plan", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment mode", + "type": "string", + "enum": [ + "SHIP", + "DELIVERY", + "PICKUP", + "FOR_HERE", + "DIGITAL" + ] + }, + "status": { + "description": "The current workflow status of the plan. Valid values: OPEN, IN_PROGRESS, COMPLETED, CANCELED (OPEN is deprecated). This field drives the fulfillment process, controls which actions are allowed, and is mapped to inventory status for external systems.", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-plan-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Plan status", + "type": "string", + "enum": [ + "OPEN", + "IN_PROGRESS", + "COMPLETED", + "CANCELED" + ] + }, + "locationId": { + "type": "string", + "description": "Reference to the Inventory Location (as defined by the Inventory Service) where the fulfillment was processed at" + }, + "origin": { + "description": "Origin address information for the fulfillment plan. Typically this is the address of the warehouse or fulfillment center (e.g. Location)", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Address", + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The address details", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + }, + "hasErrors": { + "type": "boolean", + "description": "True if any item in the plan encountered an error during inventory sync or fulfillment. This flag is set when errors are detected and is used to block further processing, trigger alerts, and surface issues for operator intervention." + }, + "destination": { + "description": "Destination address information for the fulfillment plan", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Address", + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The address details", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + }, + "items": { + "type": "array", + "description": "Items in the fulfillment plan", + "minItems": 1, + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-plan-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Plan Item", + "description": "Represents an item that's included in a fulfillment plan", + "allOf": [ + { + "type": "object", + "required": [ + "id", + "fulfilledQuantity", + "status" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the plan item. Used for referencing in fulfillments, cancellations, and inventory reservations." + }, + "fulfilledQuantity": { + "type": "number", + "default": 0, + "description": "The quantity of this item that has been successfully fulfilled (e.g., shipped, delivered, or picked up). Updated as fulfillments are processed; used to determine if the item is complete.", + "readOnly": true, + "format": "float" + }, + "reservedQuantity": { + "type": "integer", + "description": "The quantity currently reserved in the external inventory system for this item. Set by inventory sync flows to prevent overselling; released or decremented as fulfillments or cancellations occur." + }, + "canceledQuantity": { + "type": "integer", + "description": "The quantity of this item that has been canceled and will not be fulfilled. Updated when cancellations are processed; used to release inventory and update plan status." + }, + "inProgressQuantity": { + "type": "integer", + "description": "The quantity currently in the process of being fulfilled (e.g., picked, packed, but not yet shipped). Used to track work-in-progress and drive inventory status updates." + }, + "backorderedQuantity": { + "type": "integer", + "description": "The quantity that could not be reserved due to insufficient stock and is placed on backorder. Set by inventory sync flows based on inventory API responses." + }, + "status": { + "type": "string", + "description": "The current workflow status of this item (IN_PROGRESS, COMPLETED, CANCELED). Drives item-level fulfillment and inventory actions.", + "enum": [ + "IN_PROGRESS", + "COMPLETED", + "CANCELED" + ] + }, + "updatedAt": { + "description": "Timestamp of the last update to this item. Used for audit and concurrency control.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "error": { + "type": "string", + "description": "Error message if inventory sync or fulfillment failed for this item. Set by inventory sync flows when exceptions or API errors occur." + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the Catalog service (commerce API v2). Used for catalog lookups and cross-service integration." + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Item", + "type": "object", + "description": "Represents an item that's included in a fulfillment / fulfillment plan", + "required": [ + "quantity", + "name" + ], + "properties": { + "quantity": { + "type": "number", + "description": "Quantity for the fulfillment item. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "name": { + "type": "string", + "description": "Name of the fulfillment item used for display purposes" + }, + "sku": { + "type": "string", + "description": "SKU for the fulfillment item. Optional. Deprecated in v2" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the Catalog service (commerce API v2). Optional." + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the Catalog service (commerce API v1). Optional." + }, + "lineItemId": { + "type": "string", + "description": "Reference to a Line Item as defined by the Order service. Optional since fulfillments do not have to be tied to an order." + }, + "fulfillmentPlanItemId": { + "type": "string", + "description": "Reference to the FulfillmentPlanItem this item fulfills. Required if the fulfillment is linked to a plan." + } + } + } + ] + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to the fulfillment plan", + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to a fulfillment / fulfillment plan", + "required": [ + "eventName", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "FULFILLMENT.CANCELED" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the fulfillment plan was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the fulfillment plan was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } }, { "type": "object", @@ -224,7 +4351,605 @@ "type": "array", "description": "List of fulfillments associated to the fulfillment plan", "items": { - "$ref": "#/components/schemas/Fulfillment" + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment", + "type": "object", + "description": "A fulfillment represents a task to fulfill one or more items from a single location for a single fulfillment mode. A Fulfillment can exist in the context of an order or be independent of one.", + "required": [ + "id", + "storeId", + "mode", + "status", + "detailedStatus", + "locationId", + "items" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fulfillment (`Fulfillment_`). Auto-generated by our system on creation", + "readOnly": true, + "example": "Fulfillment_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for the fulfillment", + "example": "FM-Y6BN43DB590L" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the fulfillment belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "orderId": { + "type": "string", + "description": "Reference to an order as defined by the Orders Service", + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "fulfillmentPlanId": { + "type": "string", + "description": "Reference to the FulfillmentPlan this fulfillment was created from. Used for linking and reporting.", + "example": "FulfillmentPlan_TG41sWEXyIktH8PY4eI0nOGDoB6" + }, + "mode": { + "description": "The mode for the fulfillment", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment mode", + "type": "string", + "enum": [ + "SHIP", + "DELIVERY", + "PICKUP", + "FOR_HERE", + "DIGITAL" + ] + }, + "status": { + "description": "The current status for the fulfillment", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment status", + "type": "string", + "enum": [ + "IN_PROGRESS", + "SUCCESS", + "CANCELED", + "ERROR" + ] + }, + "detailedStatus": { + "description": "The detailed status for the fulfillment providing more granular information about the fulfillment state. This field is required for all fulfillment operations. For updates: must be present and be one of the valid detailed statuses. For creates: must be present and valid for the initial status being set (see fulfillment-constraints.json for validation rules).", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment detailed status", + "type": "string", + "enum": [ + "ERROR", + "CANCELED", + "CONFIRMED", + "AWAITING_FULFILLMENT", + "OUT_FOR_FULFILLMENT", + "ATTEMPTED_FULFILLMENT", + "SUCCESS", + "AWAITING_PICKUP" + ] + }, + "locationId": { + "type": "string", + "description": "Reference to the Inventory Location (as defined by the Inventory Service) where the fulfillment was processed at" + }, + "origin": { + "description": "Origin address information for the fulfillment. Typically this is the address of the warehouse or fulfillment center (e.g. Location)", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Address", + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The address details", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + }, + "destination": { + "description": "Destination address information for the fulfillment", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Address", + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The address details", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + }, + "inventoryBehavior": { + "type": "string", + "description": "Inventory policy for this fulfillment. Valid values: OBEY_POLICY (default), BYPASS. OBEY_POLICY decrements inventory and enforces stock checks; BYPASS skips inventory checks and allows fulfillment regardless of stock.", + "enum": [ + "OBEY_POLICY", + "BYPASS" + ], + "default": "OBEY_POLICY" + }, + "fulfillmentWindow": { + "description": "FulfillmentWindow object specifying the time window for fulfillment (e.g., delivery slot).", + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-window.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Window", + "type": "object", + "required": [ + "startAt", + "endAt" + ], + "properties": { + "startAt": { + "description": "Start of the fulfillment window. Used for scheduling and SLA tracking.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "endAt": { + "description": "End of the fulfillment window. Used for scheduling and SLA tracking.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + }, + "notes": { + "type": "array", + "description": "List of FulfillmentNote objects, used for internal or customer-facing notes.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Note", + "type": "object", + "description": "Represents a note attached to a fulfillment, which may be customer-facing or internal", + "required": [ + "id", + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the note. Used for referencing and editing notes." + }, + "content": { + "type": "string", + "description": "The note content, which may be customer-facing or internal." + }, + "author": { + "type": "string", + "description": "Name or identifier of the note's author." + }, + "authorType": { + "type": "string", + "description": "Type of author. Used for filtering and display. Defaults to CUSTOMER.", + "enum": [ + "CUSTOMER", + "MERCHANT", + "NONE" + ], + "default": "CUSTOMER" + }, + "createdAt": { + "description": "When the note was created. Used for ordering and audit.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "When the note was last updated. Used for audit and concurrency control.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "items": { + "type": "array", + "description": "Items in the fulfillment", + "minItems": 1, + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/fulfillment-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Item", + "type": "object", + "description": "Represents an item that's included in a fulfillment / fulfillment plan", + "required": [ + "quantity", + "name" + ], + "properties": { + "quantity": { + "type": "number", + "description": "Quantity for the fulfillment item. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "name": { + "type": "string", + "description": "Name of the fulfillment item used for display purposes" + }, + "sku": { + "type": "string", + "description": "SKU for the fulfillment item. Optional. Deprecated in v2" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the Catalog service (commerce API v2). Optional." + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the Catalog service (commerce API v1). Optional." + }, + "lineItemId": { + "type": "string", + "description": "Reference to a Line Item as defined by the Order service. Optional since fulfillments do not have to be tied to an order." + }, + "fulfillmentPlanItemId": { + "type": "string", + "description": "Reference to the FulfillmentPlanItem this item fulfills. Required if the fulfillment is linked to a plan." + } + } + } + }, + "trackingData": { + "type": "array", + "description": "Tracking information for a fulfillment. The ability to have multiple tracking numbers for a single fulfillment is to support `last mile` shipping use cases. We do not support fulfilling multiple discrete sets of items (e.g. multiple boxes) in a single fulfillment", + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/tracking.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tracking", + "type": "object", + "description": "Groups together relevant details about tracking a fulfillment. Typically represents a shipping label for a service like USPS", + "required": [ + "number" + ], + "properties": { + "labelId": { + "type": "string", + "description": "Reference to a Label as defined by the Label Service" + }, + "number": { + "type": "string", + "description": "The tracking number", + "example": "U897654321345678" + }, + "url": { + "type": "string", + "description": "The tracking URL", + "example": "http://www.ups.com/WebTracking/track?trackNums=U897654321345678&track.x=Track" + }, + "provider": { + "type": "string", + "description": "Tracking provider (`UPS`, `USPS`, etc.)" + }, + "service": { + "type": "string", + "description": "Tracking provider (`2nd Day`, `Priority`, `Express` etc.)" + } + } + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to the fulfillment", + "items": { + "$id": "https://godaddy.com/schemas/commerce/fulfillment/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to a fulfillment / fulfillment plan", + "required": [ + "eventName", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "FULFILLMENT.CANCELED" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the fulfillment was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the fulfillment was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } } } } @@ -236,34 +4961,592 @@ } }, "401": { - "description": "See #/components/responses/401" + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "403": { - "description": "See #/components/responses/403" + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "404": { - "description": "See #/components/responses/404" + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "409": { - "description": "See #/components/responses/409" + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "422": { - "description": "See #/components/responses/422" + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "500": { - "description": "See #/components/responses/500" + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "502": { - "description": "See #/components/responses/502" + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "503": { - "description": "See #/components/responses/503" + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "504": { - "description": "See #/components/responses/504" + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } } }, "scopes": [] } ] -} +} \ No newline at end of file diff --git a/src/cli/schemas/api/location-addresses.json b/src/cli/schemas/api/location-addresses.json index b054069..2fd6166 100644 --- a/src/cli/schemas/api/location-addresses.json +++ b/src/cli/schemas/api/location-addresses.json @@ -30,7 +30,9 @@ "properties": { "status": { "type": "string", - "enum": ["SUCCESS"] + "enum": [ + "SUCCESS" + ] }, "data": { "type": "object", @@ -38,6 +40,8 @@ "matches": { "type": "array", "items": { + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "title": "Postal Address (Medium-Grained)", "description": "An internationalized postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) from Google's Address Data Service and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute).", @@ -84,6 +88,8 @@ }, "countryCode": { "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", "type": "string", "maxLength": 2, "minLength": 2, @@ -130,9 +136,11 @@ "maxLength": 1 }, "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "title": "Geographic Coordinates", - "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", "properties": { "longitude": { "type": "string", @@ -143,43 +151,53 @@ "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" } }, - "required": ["longitude", "latitude"] + "required": [ + "longitude", + "latitude" + ] } } } }, - "required": ["countryCode"] + "required": [ + "countryCode" + ] } } } } }, - "required": ["status", "data"] + "required": [ + "status", + "data" + ] } }, "401": { - "description": "See https://schemas.api.godaddy.com/common-types/v1/schemas/yaml/error.yaml" + "description": "The error information." }, "403": { - "description": "See https://schemas.api.godaddy.com/common-types/v1/schemas/yaml/error.yaml" + "description": "The error information." }, "404": { - "description": "See https://schemas.api.godaddy.com/common-types/v1/schemas/yaml/error.yaml" + "description": "The error information." }, "500": { - "description": "See https://schemas.api.godaddy.com/common-types/v1/schemas/yaml/error.yaml" + "description": "The error information." }, "502": { - "description": "See https://schemas.api.godaddy.com/common-types/v1/schemas/yaml/error.yaml" + "description": "The error information." }, "503": { - "description": "See https://schemas.api.godaddy.com/common-types/v1/schemas/yaml/error.yaml" + "description": "The error information." }, "504": { - "description": "See https://schemas.api.godaddy.com/common-types/v1/schemas/yaml/error.yaml" + "description": "The error information." } }, - "scopes": ["location.address-verification:execute"] + "scopes": [ + "location.address-verification:execute" + ] }, { "operationId": "commerce.location.verify-address", @@ -191,6 +209,8 @@ "description": "This is the address to be verified", "contentType": "application/json", "schema": { + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "title": "Postal Address (Medium-Grained)", "description": "An internationalized postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) from Google's Address Data Service and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute).", @@ -237,6 +257,8 @@ }, "countryCode": { "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", "type": "string", "maxLength": 2, "minLength": 2, @@ -283,9 +305,11 @@ "maxLength": 1 }, "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "title": "Geographic Coordinates", - "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", "properties": { "longitude": { "type": "string", @@ -296,12 +320,17 @@ "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" } }, - "required": ["longitude", "latitude"] + "required": [ + "longitude", + "latitude" + ] } } } }, - "required": ["countryCode"] + "required": [ + "countryCode" + ] } }, "responses": { @@ -312,7 +341,9 @@ "properties": { "status": { "type": "string", - "enum": ["SUCCESS"] + "enum": [ + "SUCCESS" + ] }, "data": { "type": "object", @@ -320,6 +351,8 @@ "matches": { "type": "array", "items": { + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "title": "Postal Address (Medium-Grained)", "description": "An internationalized postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) from Google's Address Data Service and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute).", @@ -366,6 +399,8 @@ }, "countryCode": { "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", "type": "string", "maxLength": 2, "minLength": 2, @@ -412,9 +447,11 @@ "maxLength": 1 }, "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "title": "Geographic Coordinates", - "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", "properties": { "longitude": { "type": "string", @@ -425,43 +462,53 @@ "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" } }, - "required": ["longitude", "latitude"] + "required": [ + "longitude", + "latitude" + ] } } } }, - "required": ["countryCode"] + "required": [ + "countryCode" + ] } } } } }, - "required": ["status", "data"] + "required": [ + "status", + "data" + ] } }, "401": { - "description": "See https://schemas.api.godaddy.com/common-types/v1/schemas/yaml/error.yaml" + "description": "The error information." }, "403": { - "description": "See https://schemas.api.godaddy.com/common-types/v1/schemas/yaml/error.yaml" + "description": "The error information." }, "404": { - "description": "See https://schemas.api.godaddy.com/common-types/v1/schemas/yaml/error.yaml" + "description": "The error information." }, "500": { - "description": "See https://schemas.api.godaddy.com/common-types/v1/schemas/yaml/error.yaml" + "description": "The error information." }, "502": { - "description": "See https://schemas.api.godaddy.com/common-types/v1/schemas/yaml/error.yaml" + "description": "The error information." }, "503": { - "description": "See https://schemas.api.godaddy.com/common-types/v1/schemas/yaml/error.yaml" + "description": "The error information." }, "504": { - "description": "See https://schemas.api.godaddy.com/common-types/v1/schemas/yaml/error.yaml" + "description": "The error information." } }, - "scopes": ["location.address-verification:execute"] + "scopes": [ + "location.address-verification:execute" + ] } ] -} +} \ No newline at end of file diff --git a/src/cli/schemas/api/manifest.json b/src/cli/schemas/api/manifest.json index dac9e9c..39ddfe7 100644 --- a/src/cli/schemas/api/manifest.json +++ b/src/cli/schemas/api/manifest.json @@ -1,5 +1,5 @@ { - "generated": "2026-03-18T18:46:55.475Z", + "generated": "2026-05-14T16:10:01.272Z", "domains": { "bulk-operations": { "file": "bulk-operations.json", @@ -21,6 +21,16 @@ "title": "Channels API", "endpointCount": 8 }, + "chargebacks": { + "file": "chargebacks.json", + "title": "Chargeback Management", + "endpointCount": 10 + }, + "customer-profiles": { + "file": "customer-profiles.json", + "title": "Customers API", + "endpointCount": 9 + }, "fulfillments": { "file": "fulfillments.json", "title": "Fulfillment Service", @@ -39,13 +49,48 @@ "orders": { "file": "orders.json", "title": "Order Service", - "endpointCount": 14 + "endpointCount": 15 + }, + "payment-requests": { + "file": "payment-requests.json", + "title": "Payment Requests API", + "endpointCount": 5 + }, + "payments": { + "file": "payments.json", + "title": "Payments API", + "endpointCount": 43 + }, + "price-adjustments": { + "file": "price-adjustments.json", + "title": "GoDaddy Price Adjustment API", + "endpointCount": 10 + }, + "recommendations": { + "file": "recommendations.json", + "title": "GoDaddy Recommendation API", + "endpointCount": 1 + }, + "shipping": { + "file": "shipping.json", + "title": "Shipping Service", + "endpointCount": 7 }, "stores": { "file": "stores.json", "title": "Commerce Store API", "endpointCount": 8 }, + "subscriptions": { + "file": "subscriptions.json", + "title": "Commerce Subscription API", + "endpointCount": 8 + }, + "taxes": { + "file": "taxes.json", + "title": "Tax GraphQL API", + "endpointCount": 1 + }, "transactions": { "file": "transactions.json", "title": "Transactions API", @@ -57,4 +102,4 @@ "endpointCount": 2 } } -} +} \ No newline at end of file diff --git a/src/cli/schemas/api/metafields.json b/src/cli/schemas/api/metafields.json index 22b8c85..b9796b9 100644 --- a/src/cli/schemas/api/metafields.json +++ b/src/cli/schemas/api/metafields.json @@ -18,6 +18,8 @@ "required": true, "description": "The store ID that metafields are scoped to", "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", "type": "string", "format": "uuid" @@ -55,7 +57,10 @@ "schema": { "type": "string", "description": "Page token direction", - "enum": ["BACKWARD", "FORWARD"], + "enum": [ + "BACKWARD", + "FORWARD" + ], "default": "FORWARD" } }, @@ -89,12 +94,120 @@ "metafields": { "type": "array", "items": { - "$ref": "#/components/schemas/metafield" + "$id": "https://godaddy.com/schemas/commerce/metafields/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "metafield", + "type": "object", + "description": "A metafield is a custom value that can be associated with a GoDaddy commerce top-level entitiy (e.g. Order).", + "required": [ + "id", + "storeId", + "resourceId", + "metafieldDefinitionId", + "namespace", + "key", + "value", + "type", + "createdAt", + "updatedAt" + ], + "properties": { + "id": { + "description": "The unique identifier for the metafield.", + "type": "string" + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "description": "The unique identifier for the resource of the metafield.", + "type": "string" + }, + "metafieldDefinitionId": { + "description": "The unique identifier for the metafield definition.", + "type": "string" + }, + "namespace": { + "type": "string", + "description": "The namespace of the metafield.", + "example": "my_namespace" + }, + "key": { + "type": "string", + "description": "The key of the metafield.", + "example": "my_key" + }, + "value": { + "type": "string", + "description": "The value of the metafield.", + "example": "my_value" + }, + "type": { + "type": "string", + "description": "The type of the metafield.", + "example": "string" + }, + "resourceType": { + "type": "string", + "description": "The type of entity that the definition is associated with.", + "enum": [ + "STORE", + "CHANNEL", + "ORDER", + "PRODUCT", + "PRODUCT_VARIANT", + "CUSTOMER" + ], + "example": "ORDER" + }, + "createdAt": { + "description": "The date and time the metafield was created.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the metafield was updated.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "deletedAt": { + "description": "The date and time the metafield was deleted.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archivedAt": { + "description": "The date and time the metafield was archived.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } } }, "links": { "type": "array", "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Link Description", "type": "object", "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", @@ -132,422 +245,368 @@ "description": "The schema that describes the request data." } }, - "required": ["rel", "href"] + "required": [ + "rel", + "href" + ] } } } } }, "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "500": { - "description": "See #/components/responses/500" - } - }, - "scopes": ["commerce.metafield:read"] - }, - { - "operationId": "createMetafield", - "method": "POST", - "path": "/stores/{storeId}/metafields", - "summary": "Create metafield", - "description": "This endpoint creates a metafield and associates it with a store and resource using the store ID.", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The store ID that metafields are scoped to", - "schema": { - "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "required": true, - "description": "The metafield to create", - "contentType": "application/json", - "schema": { - "$ref": "#/components/schemas/metafield-create-input" - } - }, - "responses": { - "200": { - "description": "Success response when creating a metafield", + "description": "Authorization info not sent or is invalid", "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", - "properties": { - "metafield": { - "$ref": "#/components/schemas/metafield" + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } - } - } - }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "500": { - "description": "See #/components/responses/500" - } - }, - "scopes": ["commerce.metafield:create"] - }, - { - "operationId": "bulkDeleteMetafields", - "method": "POST", - "path": "/stores/{storeId}/metafields/bulk-delete", - "summary": "Bulk deletes metafields", - "description": "This endpoint bulk deletes metafields by resourceId, namespace, and key.", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The store ID that metafields are scoped to", - "schema": { - "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "required": true, - "description": "The metafields to delete", - "contentType": "application/json", - "schema": { - "$ref": "#/components/schemas/metafields-bulk-delete-input" - } - }, - "responses": { - "200": { - "description": "Success response when bulk deleting metafields", - "schema": { - "type": "object", + }, "properties": { - "metafieldIds": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { "type": "array", - "description": "The IDs of the deleted metafields", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, "items": { - "type": "string", - "description": "The ID of the deleted metafield" + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } - } + }, + "required": [ + "name", + "correlationId", + "message" + ] } }, - "401": { - "description": "See #/components/responses/401" - }, "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "500": { - "description": "See #/components/responses/500" - } - }, - "scopes": ["commerce.metafield:delete"] - }, - { - "operationId": "getMetafield", - "method": "GET", - "path": "/stores/{storeId}/metafields/{metafieldId}", - "summary": "Get a metafield", - "description": "Retrieve the information of a single metafield from a specific store using the store and metafield IDs.", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The store ID that metafields are scoped to", - "schema": { - "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", - "type": "string", - "format": "uuid" - } - }, - { - "name": "metafieldId", - "in": "path", - "required": true, - "description": "The ID of the metafield", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success response when getting a metafield", + "description": "Invalid request", "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", - "properties": { - "metafield": { - "$ref": "#/components/schemas/metafield" + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } - } - } - }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "500": { - "description": "See #/components/responses/500" - } - }, - "scopes": ["commerce.metafield:read"] - }, - { - "operationId": "deleteMetafield", - "method": "DELETE", - "path": "/stores/{storeId}/metafields/{metafieldId}", - "summary": "Delete a metafield", - "description": "Delete the information of a single metafield from a specific store using the store and metafield IDs.", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The store ID that metafields are scoped to", - "schema": { - "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", - "type": "string", - "format": "uuid" - } - }, - { - "name": "metafieldId", - "in": "path", - "required": true, - "description": "The ID of the metafield to delete", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success response when deleting a metafield", - "schema": { - "type": "object", + }, "properties": { - "id": { + "name": { "type": "string", - "description": "The ID of the deleted metafield" + "description": "The human-readable, unique name of the error." }, - "status": { + "correlationId": { "type": "string", - "description": "Status of the delete operation", - "enum": ["success", "failure"] - } - } - } - }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "500": { - "description": "See #/components/responses/500" - } - }, - "scopes": ["commerce.metafield:delete"] - }, - { - "operationId": "updateMetafield", - "method": "PUT", - "path": "/stores/{storeId}/metafields/{metafieldId}", - "summary": "Update a metafield", - "description": "Update the information of a single metafield using the store and metafield IDs.", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The store ID that metafields are scoped to", - "schema": { - "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", - "type": "string", - "format": "uuid" - } - }, - { - "name": "metafieldId", - "in": "path", - "required": true, - "description": "The ID of the metafield to update", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "description": "The metafield fields to update", - "contentType": "application/json", - "schema": { - "type": "object", - "properties": { - "metafield": { - "$ref": "#/components/schemas/metafield-update-input" - } - } - } - }, - "responses": { - "200": { - "description": "Success response when updating a metafield", - "schema": { - "type": "object", - "properties": { - "metafield": { - "$ref": "#/components/schemas/metafield" - } - } - } - }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "500": { - "description": "See #/components/responses/500" - } - }, - "scopes": ["commerce.metafield:update"] - }, - { - "operationId": "getMetafieldDefinitions", - "method": "GET", - "path": "/stores/{storeId}/metafield-definitions", - "summary": "Get metafield definition", - "description": "Retrieves all metafield definitions for a given store and resourceType", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The store ID that metafields are scoped to", - "schema": { - "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", - "type": "string", - "format": "uuid" - } - }, - { - "name": "pageSize", - "in": "query", - "required": false, - "description": "A non-negative, non-zero integer indicating the maximum number of resouces to return at one time", - "schema": { - "type": "integer", - "format": "int64", - "minimum": 1, - "maximum": 50, - "default": 25 - } - }, - { - "name": "pageToken", - "in": "query", - "required": false, - "description": "The cursor to use to fetch the next page of results", - "schema": { - "type": "string", - "description": "A string cursor representing a key or ID to use to fetch the next page of results", - "example": "MTY1MTc0NTczMDAwMDsyRzVWc1dFRmhJa3RIOFBZNHFDMGlPR0RwVko=" - } - }, - { - "name": "pageTokenDirection", - "in": "query", - "required": false, - "description": "Direction indicating whether to fetch the next page of results or the previous page of results", - "schema": { - "type": "string", - "description": "Page token direction", - "enum": ["BACKWARD", "FORWARD"], - "default": "FORWARD" - } - }, - { - "name": "resourceType", - "in": "query", - "required": true, - "description": "The resource type that the metafield definitions belong to", - "schema": { - "type": "string", - "description": "Resource type enum value", - "enum": [ - "STORE", - "CHANNEL", - "ORDER", - "PRODUCT", - "PRODUCT_VARIANT", - "CUSTOMER" - ] - } - }, - { - "name": "namespace", - "in": "query", - "required": false, - "description": "A namespace to filter metafields by", - "schema": { - "type": "string", - "description": "The namespace of the metafields to query by" - } - } - ], - "responses": { - "200": { - "description": "An array of metafield definitions that are associated with the given store and resourceType", - "schema": { - "type": "object", - "properties": { - "metafieldDefinitions": { + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, "items": { - "$ref": "#/components/schemas/metafield-definition" + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] } }, "links": { "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Link Description", "type": "object", "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", @@ -585,147 +644,435 @@ "description": "The schema that describes the request data." } }, - "required": ["rel", "href"] + "required": [ + "rel", + "href" + ] } } - } + }, + "required": [ + "name", + "correlationId", + "message" + ] } }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, "404": { - "description": "See #/components/responses/404" - }, - "500": { - "description": "See #/components/responses/500" - } - }, - "scopes": ["commerce.metafield:read"] - }, - { - "operationId": "createMetafieldDefinition", - "method": "POST", - "path": "/stores/{storeId}/metafield-definitions", - "summary": "Create a metafield definition", - "description": "This endpoint can be used to create a metafield definition and associate it with a store and resourceType", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The store ID that metafields are scoped to", - "schema": { - "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "required": true, - "description": "The metafield definition to create", - "contentType": "application/json", - "schema": { - "type": "object", - "properties": { - "metafieldDefinition": { - "$ref": "#/components/schemas/metafield-definition-create-input" - } - } - } - }, - "responses": { - "200": { - "description": "Success response when creating a metafield definition", + "description": "Resource not found", "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, "properties": { - "metafieldDefinition": { - "$ref": "#/components/schemas/metafield-definition" + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } } - } + }, + "required": [ + "name", + "correlationId", + "message" + ] } }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, "500": { - "description": "See #/components/responses/500" - } - }, - "scopes": ["commerce.metafield:create"] - }, - { - "operationId": "getMetafieldDefinition", - "method": "GET", - "path": "/stores/{storeId}/metafield-definitions/{metafieldDefinitionId}", - "summary": "Get metafield definition by ID ", - "description": "This endpoint returns a single metafield definition using the metafield ID or resourceType and nampespace and key.", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The store ID that metafields are scoped to", - "schema": { - "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", - "type": "string", - "format": "uuid" - } - }, - { - "name": "metafieldDefinitionId", - "in": "path", - "required": true, - "description": "The metafield definition ID", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "A single metafield definition object", + "description": "Server error", "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, "properties": { - "metafieldDefinition": { - "$ref": "#/components/schemas/metafield-definition" + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } } - } + }, + "required": [ + "name", + "correlationId", + "message" + ] } - }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "500": { - "description": "See #/components/responses/500" } }, - "scopes": ["commerce.metafield:read"] + "scopes": [ + "commerce.metafield:read" + ] }, { - "operationId": "updateMetafieldDefinition", - "method": "PUT", - "path": "/stores/{storeId}/metafield-definitions/{metafieldDefinitionId}", - "summary": "Update a metafield definition", - "description": "This endpoint can be used to update a single metafield definition using the store and metafieldDefinition IDs.", + "operationId": "createMetafield", + "method": "POST", + "path": "/stores/{storeId}/metafields", + "summary": "Create metafield", + "description": "This endpoint creates a metafield and associates it with a store and resource using the store ID.", "parameters": [ { "name": "storeId", @@ -733,170 +1080,10861 @@ "required": true, "description": "The store ID that metafields are scoped to", "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", "type": "string", "format": "uuid" } - }, - { - "name": "metafieldDefinitionId", - "in": "path", - "required": true, - "description": "The ID of the metafield definition to update", - "schema": { - "type": "string" - } } ], "requestBody": { "required": true, - "description": "The metafield definition fields to update", + "description": "The metafield to create", "contentType": "application/json", "schema": { + "$id": "https://godaddy.com/schemas/commerce/metafields/metafield-create-input.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "metafield-create-input", "type": "object", + "description": "Input object for creating a metafield", + "required": [ + "storeId", + "resourceId", + "namespace", + "key", + "value" + ], "properties": { - "metafield": { - "$ref": "#/components/schemas/metafield-definition-update-input" + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "resourceType": { + "type": "string", + "description": "The type of entity that the definition is associated with.", + "enum": [ + "STORE", + "CHANNEL", + "ORDER", + "PRODUCT", + "PRODUCT_VARIANT", + "CUSTOMER" + ], + "example": "ORDER" + }, + "resourceId": { + "description": "The unique identifier for the resource of the metafield.", + "type": "string" + }, + "namespace": { + "type": "string", + "description": "The namespace of the metafield.", + "example": "my_namespace" + }, + "key": { + "type": "string", + "description": "The key of the metafield.", + "example": "my_key" + }, + "value": { + "type": "string", + "description": "The value of the metafield.", + "example": "my_value" + }, + "type": { + "type": "string", + "description": "The type of the metafield.", + "example": "string" + }, + "scope": { + "type": "string", + "description": "The definition scope. Determines whether a metafield can be viewed or updated by other parties", + "enum": [ + "PUBLIC", + "PRIVATE" + ], + "example": "PUBLIC" + }, + "validations": { + "type": "array", + "description": "A list of validations that should be applied to the metafield value when creating or updating a metafield.", + "items": { + "type": "object", + "description": "A object that represents a validation that can be performed on the metafield value when it is being created or updated.", + "required": [ + "name", + "value", + "valueType" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the validation", + "example": "min" + }, + "value": { + "type": "string", + "description": "The value of the validation that the metafield value is compared against", + "example": "10" + }, + "valueType": { + "type": "string", + "description": "Representation of what data type the validation value is.", + "example": "number" + } + } + } } } } }, "responses": { "200": { - "description": "Success response when updating a metafield definition", + "description": "Success response when creating a metafield", "schema": { "type": "object", "properties": { "metafield": { - "$ref": "#/components/schemas/metafield-definition" - } - } - } - }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "500": { - "description": "See #/components/responses/500" - } - }, - "scopes": ["commerce.metafield:update"] - }, - { - "operationId": "deleteMetafieldDefinition", - "method": "DELETE", - "path": "/stores/{storeId}/metafield-definitions/{metafieldDefinitionId}", - "summary": "Delete a metafield", - "description": "This endpoint can be used to delete a single metafield definition using the store and metafieldDefinition IDs.", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The store ID that metafields are scoped to", - "schema": { - "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", - "type": "string", - "format": "uuid" + "$id": "https://godaddy.com/schemas/commerce/metafields/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "metafield", + "type": "object", + "description": "A metafield is a custom value that can be associated with a GoDaddy commerce top-level entitiy (e.g. Order).", + "required": [ + "id", + "storeId", + "resourceId", + "metafieldDefinitionId", + "namespace", + "key", + "value", + "type", + "createdAt", + "updatedAt" + ], + "properties": { + "id": { + "description": "The unique identifier for the metafield.", + "type": "string" + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "description": "The unique identifier for the resource of the metafield.", + "type": "string" + }, + "metafieldDefinitionId": { + "description": "The unique identifier for the metafield definition.", + "type": "string" + }, + "namespace": { + "type": "string", + "description": "The namespace of the metafield.", + "example": "my_namespace" + }, + "key": { + "type": "string", + "description": "The key of the metafield.", + "example": "my_key" + }, + "value": { + "type": "string", + "description": "The value of the metafield.", + "example": "my_value" + }, + "type": { + "type": "string", + "description": "The type of the metafield.", + "example": "string" + }, + "resourceType": { + "type": "string", + "description": "The type of entity that the definition is associated with.", + "enum": [ + "STORE", + "CHANNEL", + "ORDER", + "PRODUCT", + "PRODUCT_VARIANT", + "CUSTOMER" + ], + "example": "ORDER" + }, + "createdAt": { + "description": "The date and time the metafield was created.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the metafield was updated.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "deletedAt": { + "description": "The date and time the metafield was deleted.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archivedAt": { + "description": "The date and time the metafield was archived.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } } }, - { - "name": "metafieldDefinitionId", - "in": "path", - "required": true, - "description": "The metafield definition ID", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "A single metafield definition object", + "401": { + "description": "Authorization info not sent or is invalid", "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, "properties": { - "id": { + "name": { "type": "string", - "description": "The ID of the deleted metafield definition" + "description": "The human-readable, unique name of the error." }, - "status": { + "correlationId": { "type": "string", - "description": "The status of the deleted metafield definition", - "enum": ["success", "error"] + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } } - } + }, + "required": [ + "name", + "correlationId", + "message" + ] } }, - "401": { - "description": "See #/components/responses/401" - }, "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "500": { - "description": "See #/components/responses/500" - } - }, - "scopes": ["commerce.metafield:delete"] - }, - { - "operationId": "getMetafieldDefinitionTypes", - "method": "GET", - "path": "/stores/{storeId}/metafield-definition-types", - "summary": "Get all metafield definition types", - "description": "This endpoint can be used to retrieve all the metafield definition types available using the store ID.", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "The store ID that metafields are scoped to", - "schema": { - "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "An array of metafield definition types that are available for clients to use when creating metafield definitions and values", + "description": "Invalid request", "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, "properties": { - "metafieldDefinitionTypes": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, "items": { - "$ref": "#/components/schemas/metafield-definition-type" + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } - } + }, + "required": [ + "name", + "correlationId", + "message" + ] } }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, "404": { - "description": "See #/components/responses/404" - }, - "500": { - "description": "See #/components/responses/500" + "description": "Resource not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Server error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.metafield:create" + ] + }, + { + "operationId": "bulkDeleteMetafields", + "method": "POST", + "path": "/stores/{storeId}/metafields/bulk-delete", + "summary": "Bulk deletes metafields", + "description": "This endpoint bulk deletes metafields by resourceId, namespace, and key.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The store ID that metafields are scoped to", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "description": "The metafields to delete", + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/metafields/metafields-bulk-delete-input.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "metafields-bulk-delete-input", + "type": "object", + "properties": { + "metafieldIds": { + "type": "array", + "description": "A list of metafield IDs for bulk deleting metafields.", + "items": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + "metafields": { + "type": "array", + "description": "A list of metafield identifiers for bulk deleting metafields.", + "items": { + "type": "object", + "description": "Input object to identify a metafield for deletion.", + "required": [ + "resourceId", + "namespace", + "key" + ], + "properties": { + "resourceId": { + "description": "The unique identifier for the resource of the metafield.", + "type": "string" + }, + "namespace": { + "type": "string", + "description": "The namespace of the metafield.", + "example": "my_namespace" + }, + "key": { + "type": "string", + "description": "The key of the metafield.", + "example": "my_key" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Success response when bulk deleting metafields", + "schema": { + "type": "object", + "properties": { + "metafieldIds": { + "type": "array", + "description": "The IDs of the deleted metafields", + "items": { + "type": "string", + "description": "The ID of the deleted metafield" + } + } + } + } + }, + "401": { + "description": "Authorization info not sent or is invalid", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "403": { + "description": "Invalid request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Server error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.metafield:delete" + ] + }, + { + "operationId": "getMetafield", + "method": "GET", + "path": "/stores/{storeId}/metafields/{metafieldId}", + "summary": "Get a metafield", + "description": "Retrieve the information of a single metafield from a specific store using the store and metafield IDs.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The store ID that metafields are scoped to", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "metafieldId", + "in": "path", + "required": true, + "description": "The ID of the metafield", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success response when getting a metafield", + "schema": { + "type": "object", + "properties": { + "metafield": { + "$id": "https://godaddy.com/schemas/commerce/metafields/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "metafield", + "type": "object", + "description": "A metafield is a custom value that can be associated with a GoDaddy commerce top-level entitiy (e.g. Order).", + "required": [ + "id", + "storeId", + "resourceId", + "metafieldDefinitionId", + "namespace", + "key", + "value", + "type", + "createdAt", + "updatedAt" + ], + "properties": { + "id": { + "description": "The unique identifier for the metafield.", + "type": "string" + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "description": "The unique identifier for the resource of the metafield.", + "type": "string" + }, + "metafieldDefinitionId": { + "description": "The unique identifier for the metafield definition.", + "type": "string" + }, + "namespace": { + "type": "string", + "description": "The namespace of the metafield.", + "example": "my_namespace" + }, + "key": { + "type": "string", + "description": "The key of the metafield.", + "example": "my_key" + }, + "value": { + "type": "string", + "description": "The value of the metafield.", + "example": "my_value" + }, + "type": { + "type": "string", + "description": "The type of the metafield.", + "example": "string" + }, + "resourceType": { + "type": "string", + "description": "The type of entity that the definition is associated with.", + "enum": [ + "STORE", + "CHANNEL", + "ORDER", + "PRODUCT", + "PRODUCT_VARIANT", + "CUSTOMER" + ], + "example": "ORDER" + }, + "createdAt": { + "description": "The date and time the metafield was created.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the metafield was updated.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "deletedAt": { + "description": "The date and time the metafield was deleted.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archivedAt": { + "description": "The date and time the metafield was archived.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } + } + }, + "401": { + "description": "Authorization info not sent or is invalid", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "403": { + "description": "Invalid request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Server error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.metafield:read" + ] + }, + { + "operationId": "deleteMetafield", + "method": "DELETE", + "path": "/stores/{storeId}/metafields/{metafieldId}", + "summary": "Delete a metafield", + "description": "Delete the information of a single metafield from a specific store using the store and metafield IDs.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The store ID that metafields are scoped to", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "metafieldId", + "in": "path", + "required": true, + "description": "The ID of the metafield to delete", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success response when deleting a metafield", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the deleted metafield" + }, + "status": { + "type": "string", + "description": "Status of the delete operation", + "enum": [ + "success", + "failure" + ] + } + } + } + }, + "401": { + "description": "Authorization info not sent or is invalid", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "403": { + "description": "Invalid request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Server error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.metafield:delete" + ] + }, + { + "operationId": "updateMetafield", + "method": "PUT", + "path": "/stores/{storeId}/metafields/{metafieldId}", + "summary": "Update a metafield", + "description": "Update the information of a single metafield using the store and metafield IDs.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The store ID that metafields are scoped to", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "metafieldId", + "in": "path", + "required": true, + "description": "The ID of the metafield to update", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "description": "The metafield fields to update", + "contentType": "application/json", + "schema": { + "type": "object", + "properties": { + "metafield": { + "$id": "https://godaddy.com/schemas/commerce/metafields/metafield-update-input.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "metafield-update-input", + "type": "object", + "description": "Input object for creating a metafield", + "required": [ + "id", + "storeId", + "value" + ], + "properties": { + "id": { + "description": "The unique identifier for the metafield.", + "type": "string" + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "resourceType": { + "type": "string", + "description": "The type of entity that the definition is associated with.", + "enum": [ + "STORE", + "CHANNEL", + "ORDER", + "PRODUCT", + "PRODUCT_VARIANT", + "CUSTOMER" + ], + "example": "ORDER" + }, + "value": { + "type": "string", + "description": "The value of the metafield.", + "example": "my_value" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Success response when updating a metafield", + "schema": { + "type": "object", + "properties": { + "metafield": { + "$id": "https://godaddy.com/schemas/commerce/metafields/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "metafield", + "type": "object", + "description": "A metafield is a custom value that can be associated with a GoDaddy commerce top-level entitiy (e.g. Order).", + "required": [ + "id", + "storeId", + "resourceId", + "metafieldDefinitionId", + "namespace", + "key", + "value", + "type", + "createdAt", + "updatedAt" + ], + "properties": { + "id": { + "description": "The unique identifier for the metafield.", + "type": "string" + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "resourceId": { + "description": "The unique identifier for the resource of the metafield.", + "type": "string" + }, + "metafieldDefinitionId": { + "description": "The unique identifier for the metafield definition.", + "type": "string" + }, + "namespace": { + "type": "string", + "description": "The namespace of the metafield.", + "example": "my_namespace" + }, + "key": { + "type": "string", + "description": "The key of the metafield.", + "example": "my_key" + }, + "value": { + "type": "string", + "description": "The value of the metafield.", + "example": "my_value" + }, + "type": { + "type": "string", + "description": "The type of the metafield.", + "example": "string" + }, + "resourceType": { + "type": "string", + "description": "The type of entity that the definition is associated with.", + "enum": [ + "STORE", + "CHANNEL", + "ORDER", + "PRODUCT", + "PRODUCT_VARIANT", + "CUSTOMER" + ], + "example": "ORDER" + }, + "createdAt": { + "description": "The date and time the metafield was created.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the metafield was updated.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "deletedAt": { + "description": "The date and time the metafield was deleted.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archivedAt": { + "description": "The date and time the metafield was archived.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } + } + }, + "401": { + "description": "Authorization info not sent or is invalid", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "403": { + "description": "Invalid request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Server error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.metafield:update" + ] + }, + { + "operationId": "getMetafieldDefinitions", + "method": "GET", + "path": "/stores/{storeId}/metafield-definitions", + "summary": "Get metafield definition", + "description": "Retrieves all metafield definitions for a given store and resourceType", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The store ID that metafields are scoped to", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "A non-negative, non-zero integer indicating the maximum number of resouces to return at one time", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 50, + "default": 25 + } + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "description": "The cursor to use to fetch the next page of results", + "schema": { + "type": "string", + "description": "A string cursor representing a key or ID to use to fetch the next page of results", + "example": "MTY1MTc0NTczMDAwMDsyRzVWc1dFRmhJa3RIOFBZNHFDMGlPR0RwVko=" + } + }, + { + "name": "pageTokenDirection", + "in": "query", + "required": false, + "description": "Direction indicating whether to fetch the next page of results or the previous page of results", + "schema": { + "type": "string", + "description": "Page token direction", + "enum": [ + "BACKWARD", + "FORWARD" + ], + "default": "FORWARD" + } + }, + { + "name": "resourceType", + "in": "query", + "required": true, + "description": "The resource type that the metafield definitions belong to", + "schema": { + "type": "string", + "description": "Resource type enum value", + "enum": [ + "STORE", + "CHANNEL", + "ORDER", + "PRODUCT", + "PRODUCT_VARIANT", + "CUSTOMER" + ] + } + }, + { + "name": "namespace", + "in": "query", + "required": false, + "description": "A namespace to filter metafields by", + "schema": { + "type": "string", + "description": "The namespace of the metafields to query by" + } + } + ], + "responses": { + "200": { + "description": "An array of metafield definitions that are associated with the given store and resourceType", + "schema": { + "type": "object", + "properties": { + "metafieldDefinitions": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/metafields/metafield-definition.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "metafield-definition", + "type": "object", + "description": "A metafield is a custom value that can be associated with a GoDaddy commerce top-level entitiy (e.g. Order).", + "required": [ + "id", + "storeId", + "resourceType", + "scope", + "name", + "namespace", + "key", + "type", + "createdAt", + "updatedAt" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the metafield." + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "resourceType": { + "type": "string", + "description": "The type of entity that the definition is associated with.", + "enum": [ + "STORE", + "CHANNEL", + "ORDER", + "PRODUCT", + "PRODUCT_VARIANT", + "CUSTOMER" + ], + "example": "ORDER" + }, + "scope": { + "type": "string", + "description": "The definition scope. Determines whether a metafield can be viewed or updated by other parties", + "enum": [ + "PUBLIC", + "PRIVATE" + ], + "example": "PUBLIC" + }, + "name": { + "type": "string", + "description": "The name of the metafield.", + "example": "My Metafield" + }, + "description": { + "type": "string", + "description": "The description of the metafield.", + "example": "My Metafield Description" + }, + "namespace": { + "type": "string", + "description": "The namespace of the metafield.", + "example": "my_namespace" + }, + "key": { + "type": "string", + "description": "The key of the metafield.", + "example": "my_key" + }, + "type": { + "type": "string", + "description": "The type of the metafield.", + "example": "string" + }, + "validations": { + "type": "array", + "description": "A list of validations that should be applied to the metafield value when creating or updating a metafield.", + "items": { + "type": "object", + "description": "A object that represents a validation that can be performed on the metafield value when it is being created or updated.", + "required": [ + "name", + "value", + "valueType" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the validation", + "example": "min" + }, + "value": { + "type": "string", + "description": "The value of the validation that the metafield value is compared against", + "example": "10" + }, + "valueType": { + "type": "string", + "description": "Representation of what data type the validation value is.", + "example": "number" + } + } + } + }, + "createdAt": { + "description": "The date and time the metafield was created.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the metafield was updated.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "deletedAt": { + "description": "The date and time the metafield was deleted.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archivedAt": { + "description": "The date and time the metafield was archived.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "links": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } + } + }, + "401": { + "description": "Authorization info not sent or is invalid", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "403": { + "description": "Invalid request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Server error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.metafield:read" + ] + }, + { + "operationId": "createMetafieldDefinition", + "method": "POST", + "path": "/stores/{storeId}/metafield-definitions", + "summary": "Create a metafield definition", + "description": "This endpoint can be used to create a metafield definition and associate it with a store and resourceType", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The store ID that metafields are scoped to", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "description": "The metafield definition to create", + "contentType": "application/json", + "schema": { + "type": "object", + "properties": { + "metafieldDefinition": { + "$id": "https://godaddy.com/schemas/commerce/metafields/metafield-definition-create-input.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "metafield-definition-create-input", + "type": "object", + "description": "Input object for creating a metafield definition", + "required": [ + "storeId", + "resourceType", + "scope", + "name", + "namespace", + "key", + "type" + ], + "properties": { + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "resourceType": { + "type": "string", + "description": "The type of entity that the definition is associated with.", + "enum": [ + "STORE", + "CHANNEL", + "ORDER", + "PRODUCT", + "PRODUCT_VARIANT", + "CUSTOMER" + ], + "example": "ORDER" + }, + "scope": { + "type": "string", + "description": "The definition scope. Determines whether a metafield can be viewed or updated by other parties", + "enum": [ + "PUBLIC", + "PRIVATE" + ], + "example": "PUBLIC" + }, + "name": { + "type": "string", + "description": "The name of the metafield.", + "example": "My Metafield" + }, + "description": { + "type": "string", + "description": "The description of the metafield.", + "example": "My Metafield Description" + }, + "namespace": { + "type": "string", + "description": "The namespace of the metafield.", + "example": "my_namespace" + }, + "key": { + "type": "string", + "description": "The key of the metafield.", + "example": "my_key" + }, + "type": { + "type": "string", + "description": "The type of the metafield.", + "example": "string" + }, + "validations": { + "type": "array", + "description": "A list of validations that should be applied to the metafield value when creating or updating a metafield.", + "items": { + "type": "object", + "description": "A object that represents a validation that can be performed on the metafield value when it is being created or updated.", + "required": [ + "name", + "value", + "valueType" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the validation", + "example": "min" + }, + "value": { + "type": "string", + "description": "The value of the validation that the metafield value is compared against", + "example": "10" + }, + "valueType": { + "type": "string", + "description": "Representation of what data type the validation value is.", + "example": "number" + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Success response when creating a metafield definition", + "schema": { + "type": "object", + "properties": { + "metafieldDefinition": { + "$id": "https://godaddy.com/schemas/commerce/metafields/metafield-definition.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "metafield-definition", + "type": "object", + "description": "A metafield is a custom value that can be associated with a GoDaddy commerce top-level entitiy (e.g. Order).", + "required": [ + "id", + "storeId", + "resourceType", + "scope", + "name", + "namespace", + "key", + "type", + "createdAt", + "updatedAt" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the metafield." + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "resourceType": { + "type": "string", + "description": "The type of entity that the definition is associated with.", + "enum": [ + "STORE", + "CHANNEL", + "ORDER", + "PRODUCT", + "PRODUCT_VARIANT", + "CUSTOMER" + ], + "example": "ORDER" + }, + "scope": { + "type": "string", + "description": "The definition scope. Determines whether a metafield can be viewed or updated by other parties", + "enum": [ + "PUBLIC", + "PRIVATE" + ], + "example": "PUBLIC" + }, + "name": { + "type": "string", + "description": "The name of the metafield.", + "example": "My Metafield" + }, + "description": { + "type": "string", + "description": "The description of the metafield.", + "example": "My Metafield Description" + }, + "namespace": { + "type": "string", + "description": "The namespace of the metafield.", + "example": "my_namespace" + }, + "key": { + "type": "string", + "description": "The key of the metafield.", + "example": "my_key" + }, + "type": { + "type": "string", + "description": "The type of the metafield.", + "example": "string" + }, + "validations": { + "type": "array", + "description": "A list of validations that should be applied to the metafield value when creating or updating a metafield.", + "items": { + "type": "object", + "description": "A object that represents a validation that can be performed on the metafield value when it is being created or updated.", + "required": [ + "name", + "value", + "valueType" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the validation", + "example": "min" + }, + "value": { + "type": "string", + "description": "The value of the validation that the metafield value is compared against", + "example": "10" + }, + "valueType": { + "type": "string", + "description": "Representation of what data type the validation value is.", + "example": "number" + } + } + } + }, + "createdAt": { + "description": "The date and time the metafield was created.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the metafield was updated.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "deletedAt": { + "description": "The date and time the metafield was deleted.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archivedAt": { + "description": "The date and time the metafield was archived.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } + } + }, + "401": { + "description": "Authorization info not sent or is invalid", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "403": { + "description": "Invalid request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Server error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.metafield:create" + ] + }, + { + "operationId": "getMetafieldDefinition", + "method": "GET", + "path": "/stores/{storeId}/metafield-definitions/{metafieldDefinitionId}", + "summary": "Get metafield definition by ID ", + "description": "This endpoint returns a single metafield definition using the metafield ID or resourceType and nampespace and key.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The store ID that metafields are scoped to", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "metafieldDefinitionId", + "in": "path", + "required": true, + "description": "The metafield definition ID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A single metafield definition object", + "schema": { + "type": "object", + "properties": { + "metafieldDefinition": { + "$id": "https://godaddy.com/schemas/commerce/metafields/metafield-definition.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "metafield-definition", + "type": "object", + "description": "A metafield is a custom value that can be associated with a GoDaddy commerce top-level entitiy (e.g. Order).", + "required": [ + "id", + "storeId", + "resourceType", + "scope", + "name", + "namespace", + "key", + "type", + "createdAt", + "updatedAt" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the metafield." + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "resourceType": { + "type": "string", + "description": "The type of entity that the definition is associated with.", + "enum": [ + "STORE", + "CHANNEL", + "ORDER", + "PRODUCT", + "PRODUCT_VARIANT", + "CUSTOMER" + ], + "example": "ORDER" + }, + "scope": { + "type": "string", + "description": "The definition scope. Determines whether a metafield can be viewed or updated by other parties", + "enum": [ + "PUBLIC", + "PRIVATE" + ], + "example": "PUBLIC" + }, + "name": { + "type": "string", + "description": "The name of the metafield.", + "example": "My Metafield" + }, + "description": { + "type": "string", + "description": "The description of the metafield.", + "example": "My Metafield Description" + }, + "namespace": { + "type": "string", + "description": "The namespace of the metafield.", + "example": "my_namespace" + }, + "key": { + "type": "string", + "description": "The key of the metafield.", + "example": "my_key" + }, + "type": { + "type": "string", + "description": "The type of the metafield.", + "example": "string" + }, + "validations": { + "type": "array", + "description": "A list of validations that should be applied to the metafield value when creating or updating a metafield.", + "items": { + "type": "object", + "description": "A object that represents a validation that can be performed on the metafield value when it is being created or updated.", + "required": [ + "name", + "value", + "valueType" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the validation", + "example": "min" + }, + "value": { + "type": "string", + "description": "The value of the validation that the metafield value is compared against", + "example": "10" + }, + "valueType": { + "type": "string", + "description": "Representation of what data type the validation value is.", + "example": "number" + } + } + } + }, + "createdAt": { + "description": "The date and time the metafield was created.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the metafield was updated.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "deletedAt": { + "description": "The date and time the metafield was deleted.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archivedAt": { + "description": "The date and time the metafield was archived.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } + } + }, + "401": { + "description": "Authorization info not sent or is invalid", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "403": { + "description": "Invalid request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Server error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.metafield:read" + ] + }, + { + "operationId": "updateMetafieldDefinition", + "method": "PUT", + "path": "/stores/{storeId}/metafield-definitions/{metafieldDefinitionId}", + "summary": "Update a metafield definition", + "description": "This endpoint can be used to update a single metafield definition using the store and metafieldDefinition IDs.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The store ID that metafields are scoped to", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "metafieldDefinitionId", + "in": "path", + "required": true, + "description": "The ID of the metafield definition to update", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "description": "The metafield definition fields to update", + "contentType": "application/json", + "schema": { + "type": "object", + "properties": { + "metafield": { + "$id": "https://godaddy.com/schemas/commerce/metafields/metafield-definition-update-input.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "metafield-definition-update-input", + "type": "object", + "description": "Input object for updating a metafield definition", + "required": [ + "id", + "storeId" + ], + "properties": { + "id": { + "description": "The unique identifier for the store.", + "type": "string" + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "resourceType": { + "type": "string", + "description": "The type of entity that the definition is associated with.", + "enum": [ + "STORE", + "CHANNEL", + "ORDER", + "PRODUCT", + "PRODUCT_VARIANT", + "CUSTOMER" + ], + "example": "ORDER" + }, + "scope": { + "type": "string", + "description": "The definition scope. Determines whether a metafield can be viewed or updated by other parties", + "enum": [ + "PUBLIC", + "PRIVATE" + ], + "example": "PUBLIC" + }, + "name": { + "type": "string", + "description": "The name of the metafield.", + "example": "My Metafield" + }, + "description": { + "type": "string", + "description": "The description of the metafield.", + "example": "My Metafield Description" + }, + "namespace": { + "type": "string", + "description": "The namespace of the metafield.", + "example": "my_namespace" + }, + "key": { + "type": "string", + "description": "The key of the metafield.", + "example": "my_key" + }, + "type": { + "type": "string", + "description": "The type of the metafield.", + "example": "string" + }, + "validations": { + "type": "array", + "description": "A list of validations that should be applied to the metafield value when creating or updating a metafield.", + "items": { + "type": "object", + "description": "A object that represents a validation that can be performed on the metafield value when it is being created or updated.", + "required": [ + "name", + "value", + "valueType" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the validation", + "example": "min" + }, + "value": { + "type": "string", + "description": "The value of the validation that the metafield value is compared against", + "example": "10" + }, + "valueType": { + "type": "string", + "description": "Representation of what data type the validation value is.", + "example": "number" + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Success response when updating a metafield definition", + "schema": { + "type": "object", + "properties": { + "metafield": { + "$id": "https://godaddy.com/schemas/commerce/metafields/metafield-definition.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "metafield-definition", + "type": "object", + "description": "A metafield is a custom value that can be associated with a GoDaddy commerce top-level entitiy (e.g. Order).", + "required": [ + "id", + "storeId", + "resourceType", + "scope", + "name", + "namespace", + "key", + "type", + "createdAt", + "updatedAt" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the metafield." + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "resourceType": { + "type": "string", + "description": "The type of entity that the definition is associated with.", + "enum": [ + "STORE", + "CHANNEL", + "ORDER", + "PRODUCT", + "PRODUCT_VARIANT", + "CUSTOMER" + ], + "example": "ORDER" + }, + "scope": { + "type": "string", + "description": "The definition scope. Determines whether a metafield can be viewed or updated by other parties", + "enum": [ + "PUBLIC", + "PRIVATE" + ], + "example": "PUBLIC" + }, + "name": { + "type": "string", + "description": "The name of the metafield.", + "example": "My Metafield" + }, + "description": { + "type": "string", + "description": "The description of the metafield.", + "example": "My Metafield Description" + }, + "namespace": { + "type": "string", + "description": "The namespace of the metafield.", + "example": "my_namespace" + }, + "key": { + "type": "string", + "description": "The key of the metafield.", + "example": "my_key" + }, + "type": { + "type": "string", + "description": "The type of the metafield.", + "example": "string" + }, + "validations": { + "type": "array", + "description": "A list of validations that should be applied to the metafield value when creating or updating a metafield.", + "items": { + "type": "object", + "description": "A object that represents a validation that can be performed on the metafield value when it is being created or updated.", + "required": [ + "name", + "value", + "valueType" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the validation", + "example": "min" + }, + "value": { + "type": "string", + "description": "The value of the validation that the metafield value is compared against", + "example": "10" + }, + "valueType": { + "type": "string", + "description": "Representation of what data type the validation value is.", + "example": "number" + } + } + } + }, + "createdAt": { + "description": "The date and time the metafield was created.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the metafield was updated.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "deletedAt": { + "description": "The date and time the metafield was deleted.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archivedAt": { + "description": "The date and time the metafield was archived.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } + } + }, + "401": { + "description": "Authorization info not sent or is invalid", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "403": { + "description": "Invalid request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Server error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.metafield:update" + ] + }, + { + "operationId": "deleteMetafieldDefinition", + "method": "DELETE", + "path": "/stores/{storeId}/metafield-definitions/{metafieldDefinitionId}", + "summary": "Delete a metafield", + "description": "This endpoint can be used to delete a single metafield definition using the store and metafieldDefinition IDs.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The store ID that metafields are scoped to", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "metafieldDefinitionId", + "in": "path", + "required": true, + "description": "The metafield definition ID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A single metafield definition object", + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the deleted metafield definition" + }, + "status": { + "type": "string", + "description": "The status of the deleted metafield definition", + "enum": [ + "success", + "error" + ] + } + } + } + }, + "401": { + "description": "Authorization info not sent or is invalid", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "403": { + "description": "Invalid request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Server error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.metafield:delete" + ] + }, + { + "operationId": "getMetafieldDefinitionTypes", + "method": "GET", + "path": "/stores/{storeId}/metafield-definition-types", + "summary": "Get all metafield definition types", + "description": "This endpoint can be used to retrieve all the metafield definition types available using the store ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "The store ID that metafields are scoped to", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "An array of metafield definition types that are available for clients to use when creating metafield definitions and values", + "schema": { + "type": "object", + "properties": { + "metafieldDefinitionTypes": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/metafields/metafield-definition-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "metafield-definition-type", + "type": "object", + "description": "A object that represents a validation that can be performed on the metafield value when it is being created or updated.", + "required": [ + "name", + "value", + "valueType" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the metafield definition type", + "example": "string" + }, + "availableValidations": { + "type": "array", + "description": "The list of validations that can be performed on the metafield value when it is being created or updated.", + "items": { + "type": "object", + "description": "A object that represents a validation that can be performed on the metafield value when it is being created or updated.", + "required": [ + "name", + "value", + "valueType" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the validation", + "example": "min" + }, + "value": { + "type": "string", + "description": "The value of the validation that the metafield value is compared against", + "example": "10" + }, + "valueType": { + "type": "string", + "description": "Representation of what data type the validation value is.", + "example": "number" + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Authorization info not sent or is invalid", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "403": { + "description": "Invalid request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Server error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.metafield:read"] + "scopes": [ + "commerce.metafield:read" + ] } ] -} +} \ No newline at end of file diff --git a/src/cli/schemas/api/onboarding.json b/src/cli/schemas/api/onboarding.json index 900be33..ec68000 100644 --- a/src/cli/schemas/api/onboarding.json +++ b/src/cli/schemas/api/onboarding.json @@ -37,21 +37,482 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/PagedList" + "properties": { + "totalItems": { + "description": "The total number of applications found", + "type": "integer" + }, + "totalPages": { + "description": "The total number of pages per grouped applications", + "type": "integer" + }, + "links": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } } ], "properties": { "items": { "type": "array", "items": { - "$ref": "./models/Application.yaml" + "$id": "https://godaddy.com/schemas/commerce/onboarding/application-request.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Onboarding Application", + "type": "object", + "description": "This model represents the application which is use to begin the onboarding process", + "properties": { + "id": { + "description": "Unique ID for the application", + "type": "string", + "readOnly": true + }, + "individuals": { + "description": "A list of applicants", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/individual.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Individual", + "description": "Business account owner or the person filling out the application (applicant)", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the Individual", + "type": "string", + "readOnly": true + }, + "address": { + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "description": "An internationalized postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) from Google's Address Data Service and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute).", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "customerId": { + "description": "Unique ID for GoDaddy customer", + "type": "string", + "format": "uuid" + }, + "email": { + "$id": "https://godaddy.com/schemas/common/email-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A valid, internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.", + "type": "string", + "minLength": 3, + "maxLength": 254, + "pattern": "^.+@[^\"\\-].+$" + }, + "phone": { + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "description": "The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en).", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "firstName": { + "description": "First name of the applicant", + "type": "string", + "minLength": 2, + "maxLength": 64 + }, + "ip": { + "description": "IP Address of the applicant", + "type": "string", + "format": "ipv4" + }, + "lastName": { + "description": "Last name of the applicant", + "type": "string", + "minLength": 2, + "maxLength": 64 + }, + "leadId": { + "description": "Unique Lead ID", + "type": "string", + "maxLength": 64 + }, + "type": { + "description": "Type of applicant", + "type": "string", + "default": "APPLICANT", + "enum": [ + "APPLICANT", + "OWNER", + "OWNER_APPLICANT" + ] + }, + "userId": { + "description": "Unique User ID", + "type": "string", + "maxLength": 64 + }, + "visitorId": { + "description": "The visitor id that was created during an anonymous visit", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "email" + ] + } + }, + "company": null, + "store": null, + "channel": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Channel", + "description": "An abstraction of data to create a channel", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the channel", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Channel name", + "type": "string", + "minLength": 3, + "maxLength": 128 + }, + "externalChannelId": { + "description": "Unique ID what represents an external resource", + "type": "string", + "maxLength": 36 + }, + "externalChannelType": { + "description": "A term what represents the external channel id", + "type": "string", + "maxLength": 128 + } + }, + "required": [ + "name" + ] + }, + "metadata": { + "description": "Additional parameters to create a specific type of application", + "type": "object", + "properties": { + "businessId": { + "description": "Unique ID for the business", + "type": "string", + "format": "uuid" + }, + "storeId": { + "description": "Unique ID for the store", + "type": "string", + "format": "uuid" + }, + "channelId": { + "description": "Unique ID for the channel", + "type": "string", + "format": "uuid" + }, + "context": { + "description": "Header context", + "type": "string", + "maxLength": 1024 + }, + "medium": { + "description": "The page or entity relating to this account. Ex. FacebookLP, Email, My Account", + "type": "string", + "maxLength": 64 + }, + "source": { + "description": "The point of origin that started this process", + "type": "string", + "maxLength": 64 + }, + "referralUrlId": { + "description": "The ID what was setup for a Distributor Merchant URL", + "type": "string", + "maxLength": 256 + }, + "applicationLevel": { + "description": "Current Application Level — i.e. BASIC, FULL", + "type": "string", + "readOnly": true, + "enum": [ + "BASIC", + "FULL" + ] + }, + "applicationStatus": { + "description": "The current status of the application", + "type": "string", + "readOnly": true, + "enum": [ + "INCOMPLETE", + "PENDING_FULL_APPLICATION", + "IN_REVIEW", + "APPROVED", + "DECLINED" + ] + } + } + }, + "intent": { + "description": "Identifies the type of onboarding application that is being requested for the commerce account", + "type": "string", + "default": "CREATE_BUSINESS", + "enum": [ + "CREATE_BUSINESS", + "ADD_STORE", + "ADD_CHANNEL", + "ADD_PRODUCT" + ] + }, + "products": { + "description": "List of GoDaddy product that can be added to the commerce account e.g., e.g., GD Payments, GD Debit card, GD Loans etc.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/product.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Product", + "description": "GoDaddy product that can be added to the commerce account e.g., e.g., GD Payments, GD Debit card, GD Loans etc.", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the product", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Product name", + "type": "string", + "enum": [ + "PAYMENTS" + ] + }, + "features": { + "description": "Optional capabilities/functionalities associated with GoDaddy offered Product", + "type": "array", + "items": { + "type": "string", + "default": [], + "enum": [ + "TIP_ENABLED" + ] + } + } + } + } + }, + "commerceAccountFeatures": { + "description": "Optional capabilities/functionalities associated with commerce account", + "type": "array", + "items": { + "type": "string", + "default": [], + "enum": [ + "NO_EMAIL_COMMUNICATIONS" + ] + } + } + }, + "required": [ + "intent" + ] } } } } } }, - "scopes": ["commerce.onboarding:read", "commerce.onboarding:write"] + "scopes": [ + "commerce.onboarding:read", + "commerce.onboarding:write" + ] }, { "operationId": "createApplication", @@ -85,21 +546,1030 @@ "required": false, "contentType": "application/json", "schema": { - "$ref": "./models/Application.yaml" + "$id": "https://godaddy.com/schemas/commerce/onboarding/application-request.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Onboarding Application", + "type": "object", + "description": "This model represents the application which is use to begin the onboarding process", + "properties": { + "id": { + "description": "Unique ID for the application", + "type": "string", + "readOnly": true + }, + "individuals": { + "description": "A list of applicants", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/individual.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Individual", + "description": "Business account owner or the person filling out the application (applicant)", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the Individual", + "type": "string", + "readOnly": true + }, + "address": { + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "description": "An internationalized postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) from Google's Address Data Service and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute).", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "customerId": { + "description": "Unique ID for GoDaddy customer", + "type": "string", + "format": "uuid" + }, + "email": { + "$id": "https://godaddy.com/schemas/common/email-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A valid, internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.", + "type": "string", + "minLength": 3, + "maxLength": 254, + "pattern": "^.+@[^\"\\-].+$" + }, + "phone": { + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "description": "The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en).", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "firstName": { + "description": "First name of the applicant", + "type": "string", + "minLength": 2, + "maxLength": 64 + }, + "ip": { + "description": "IP Address of the applicant", + "type": "string", + "format": "ipv4" + }, + "lastName": { + "description": "Last name of the applicant", + "type": "string", + "minLength": 2, + "maxLength": 64 + }, + "leadId": { + "description": "Unique Lead ID", + "type": "string", + "maxLength": 64 + }, + "type": { + "description": "Type of applicant", + "type": "string", + "default": "APPLICANT", + "enum": [ + "APPLICANT", + "OWNER", + "OWNER_APPLICANT" + ] + }, + "userId": { + "description": "Unique User ID", + "type": "string", + "maxLength": 64 + }, + "visitorId": { + "description": "The visitor id that was created during an anonymous visit", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "email" + ] + } + }, + "company": null, + "store": null, + "channel": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Channel", + "description": "An abstraction of data to create a channel", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the channel", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Channel name", + "type": "string", + "minLength": 3, + "maxLength": 128 + }, + "externalChannelId": { + "description": "Unique ID what represents an external resource", + "type": "string", + "maxLength": 36 + }, + "externalChannelType": { + "description": "A term what represents the external channel id", + "type": "string", + "maxLength": 128 + } + }, + "required": [ + "name" + ] + }, + "metadata": { + "description": "Additional parameters to create a specific type of application", + "type": "object", + "properties": { + "businessId": { + "description": "Unique ID for the business", + "type": "string", + "format": "uuid" + }, + "storeId": { + "description": "Unique ID for the store", + "type": "string", + "format": "uuid" + }, + "channelId": { + "description": "Unique ID for the channel", + "type": "string", + "format": "uuid" + }, + "context": { + "description": "Header context", + "type": "string", + "maxLength": 1024 + }, + "medium": { + "description": "The page or entity relating to this account. Ex. FacebookLP, Email, My Account", + "type": "string", + "maxLength": 64 + }, + "source": { + "description": "The point of origin that started this process", + "type": "string", + "maxLength": 64 + }, + "referralUrlId": { + "description": "The ID what was setup for a Distributor Merchant URL", + "type": "string", + "maxLength": 256 + }, + "applicationLevel": { + "description": "Current Application Level — i.e. BASIC, FULL", + "type": "string", + "readOnly": true, + "enum": [ + "BASIC", + "FULL" + ] + }, + "applicationStatus": { + "description": "The current status of the application", + "type": "string", + "readOnly": true, + "enum": [ + "INCOMPLETE", + "PENDING_FULL_APPLICATION", + "IN_REVIEW", + "APPROVED", + "DECLINED" + ] + } + } + }, + "intent": { + "description": "Identifies the type of onboarding application that is being requested for the commerce account", + "type": "string", + "default": "CREATE_BUSINESS", + "enum": [ + "CREATE_BUSINESS", + "ADD_STORE", + "ADD_CHANNEL", + "ADD_PRODUCT" + ] + }, + "products": { + "description": "List of GoDaddy product that can be added to the commerce account e.g., e.g., GD Payments, GD Debit card, GD Loans etc.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/product.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Product", + "description": "GoDaddy product that can be added to the commerce account e.g., e.g., GD Payments, GD Debit card, GD Loans etc.", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the product", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Product name", + "type": "string", + "enum": [ + "PAYMENTS" + ] + }, + "features": { + "description": "Optional capabilities/functionalities associated with GoDaddy offered Product", + "type": "array", + "items": { + "type": "string", + "default": [], + "enum": [ + "TIP_ENABLED" + ] + } + } + } + } + }, + "commerceAccountFeatures": { + "description": "Optional capabilities/functionalities associated with commerce account", + "type": "array", + "items": { + "type": "string", + "default": [], + "enum": [ + "NO_EMAIL_COMMUNICATIONS" + ] + } + } + }, + "required": [ + "intent" + ] } }, "responses": { "201": { "description": "Onboarding Application has been created successfully", "schema": { - "$ref": "./models/Application.yaml" + "$id": "https://godaddy.com/schemas/commerce/onboarding/application-request.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Onboarding Application", + "type": "object", + "description": "This model represents the application which is use to begin the onboarding process", + "properties": { + "id": { + "description": "Unique ID for the application", + "type": "string", + "readOnly": true + }, + "individuals": { + "description": "A list of applicants", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/individual.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Individual", + "description": "Business account owner or the person filling out the application (applicant)", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the Individual", + "type": "string", + "readOnly": true + }, + "address": { + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "description": "An internationalized postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) from Google's Address Data Service and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute).", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "customerId": { + "description": "Unique ID for GoDaddy customer", + "type": "string", + "format": "uuid" + }, + "email": { + "$id": "https://godaddy.com/schemas/common/email-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A valid, internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.", + "type": "string", + "minLength": 3, + "maxLength": 254, + "pattern": "^.+@[^\"\\-].+$" + }, + "phone": { + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "description": "The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en).", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "firstName": { + "description": "First name of the applicant", + "type": "string", + "minLength": 2, + "maxLength": 64 + }, + "ip": { + "description": "IP Address of the applicant", + "type": "string", + "format": "ipv4" + }, + "lastName": { + "description": "Last name of the applicant", + "type": "string", + "minLength": 2, + "maxLength": 64 + }, + "leadId": { + "description": "Unique Lead ID", + "type": "string", + "maxLength": 64 + }, + "type": { + "description": "Type of applicant", + "type": "string", + "default": "APPLICANT", + "enum": [ + "APPLICANT", + "OWNER", + "OWNER_APPLICANT" + ] + }, + "userId": { + "description": "Unique User ID", + "type": "string", + "maxLength": 64 + }, + "visitorId": { + "description": "The visitor id that was created during an anonymous visit", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "email" + ] + } + }, + "company": null, + "store": null, + "channel": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Channel", + "description": "An abstraction of data to create a channel", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the channel", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Channel name", + "type": "string", + "minLength": 3, + "maxLength": 128 + }, + "externalChannelId": { + "description": "Unique ID what represents an external resource", + "type": "string", + "maxLength": 36 + }, + "externalChannelType": { + "description": "A term what represents the external channel id", + "type": "string", + "maxLength": 128 + } + }, + "required": [ + "name" + ] + }, + "metadata": { + "description": "Additional parameters to create a specific type of application", + "type": "object", + "properties": { + "businessId": { + "description": "Unique ID for the business", + "type": "string", + "format": "uuid" + }, + "storeId": { + "description": "Unique ID for the store", + "type": "string", + "format": "uuid" + }, + "channelId": { + "description": "Unique ID for the channel", + "type": "string", + "format": "uuid" + }, + "context": { + "description": "Header context", + "type": "string", + "maxLength": 1024 + }, + "medium": { + "description": "The page or entity relating to this account. Ex. FacebookLP, Email, My Account", + "type": "string", + "maxLength": 64 + }, + "source": { + "description": "The point of origin that started this process", + "type": "string", + "maxLength": 64 + }, + "referralUrlId": { + "description": "The ID what was setup for a Distributor Merchant URL", + "type": "string", + "maxLength": 256 + }, + "applicationLevel": { + "description": "Current Application Level — i.e. BASIC, FULL", + "type": "string", + "readOnly": true, + "enum": [ + "BASIC", + "FULL" + ] + }, + "applicationStatus": { + "description": "The current status of the application", + "type": "string", + "readOnly": true, + "enum": [ + "INCOMPLETE", + "PENDING_FULL_APPLICATION", + "IN_REVIEW", + "APPROVED", + "DECLINED" + ] + } + } + }, + "intent": { + "description": "Identifies the type of onboarding application that is being requested for the commerce account", + "type": "string", + "default": "CREATE_BUSINESS", + "enum": [ + "CREATE_BUSINESS", + "ADD_STORE", + "ADD_CHANNEL", + "ADD_PRODUCT" + ] + }, + "products": { + "description": "List of GoDaddy product that can be added to the commerce account e.g., e.g., GD Payments, GD Debit card, GD Loans etc.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/product.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Product", + "description": "GoDaddy product that can be added to the commerce account e.g., e.g., GD Payments, GD Debit card, GD Loans etc.", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the product", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Product name", + "type": "string", + "enum": [ + "PAYMENTS" + ] + }, + "features": { + "description": "Optional capabilities/functionalities associated with GoDaddy offered Product", + "type": "array", + "items": { + "type": "string", + "default": [], + "enum": [ + "TIP_ENABLED" + ] + } + } + } + } + }, + "commerceAccountFeatures": { + "description": "Optional capabilities/functionalities associated with commerce account", + "type": "array", + "items": { + "type": "string", + "default": [], + "enum": [ + "NO_EMAIL_COMMUNICATIONS" + ] + } + } + }, + "required": [ + "intent" + ] } }, "400": { - "description": "See #/components/responses/badRequest" + "description": "Bad request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.onboarding:write"] + "scopes": [ + "commerce.onboarding:write" + ] }, { "operationId": "getOnboardingApplication", @@ -123,7 +1593,411 @@ "schema": { "allOf": [ { - "$ref": "./models/Application.yaml" + "$id": "https://godaddy.com/schemas/commerce/onboarding/application-request.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Onboarding Application", + "type": "object", + "description": "This model represents the application which is use to begin the onboarding process", + "properties": { + "id": { + "description": "Unique ID for the application", + "type": "string", + "readOnly": true + }, + "individuals": { + "description": "A list of applicants", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/individual.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Individual", + "description": "Business account owner or the person filling out the application (applicant)", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the Individual", + "type": "string", + "readOnly": true + }, + "address": { + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "description": "An internationalized postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) from Google's Address Data Service and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute).", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "customerId": { + "description": "Unique ID for GoDaddy customer", + "type": "string", + "format": "uuid" + }, + "email": { + "$id": "https://godaddy.com/schemas/common/email-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A valid, internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.", + "type": "string", + "minLength": 3, + "maxLength": 254, + "pattern": "^.+@[^\"\\-].+$" + }, + "phone": { + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "description": "The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en).", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "firstName": { + "description": "First name of the applicant", + "type": "string", + "minLength": 2, + "maxLength": 64 + }, + "ip": { + "description": "IP Address of the applicant", + "type": "string", + "format": "ipv4" + }, + "lastName": { + "description": "Last name of the applicant", + "type": "string", + "minLength": 2, + "maxLength": 64 + }, + "leadId": { + "description": "Unique Lead ID", + "type": "string", + "maxLength": 64 + }, + "type": { + "description": "Type of applicant", + "type": "string", + "default": "APPLICANT", + "enum": [ + "APPLICANT", + "OWNER", + "OWNER_APPLICANT" + ] + }, + "userId": { + "description": "Unique User ID", + "type": "string", + "maxLength": 64 + }, + "visitorId": { + "description": "The visitor id that was created during an anonymous visit", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "email" + ] + } + }, + "company": null, + "store": null, + "channel": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Channel", + "description": "An abstraction of data to create a channel", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the channel", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Channel name", + "type": "string", + "minLength": 3, + "maxLength": 128 + }, + "externalChannelId": { + "description": "Unique ID what represents an external resource", + "type": "string", + "maxLength": 36 + }, + "externalChannelType": { + "description": "A term what represents the external channel id", + "type": "string", + "maxLength": 128 + } + }, + "required": [ + "name" + ] + }, + "metadata": { + "description": "Additional parameters to create a specific type of application", + "type": "object", + "properties": { + "businessId": { + "description": "Unique ID for the business", + "type": "string", + "format": "uuid" + }, + "storeId": { + "description": "Unique ID for the store", + "type": "string", + "format": "uuid" + }, + "channelId": { + "description": "Unique ID for the channel", + "type": "string", + "format": "uuid" + }, + "context": { + "description": "Header context", + "type": "string", + "maxLength": 1024 + }, + "medium": { + "description": "The page or entity relating to this account. Ex. FacebookLP, Email, My Account", + "type": "string", + "maxLength": 64 + }, + "source": { + "description": "The point of origin that started this process", + "type": "string", + "maxLength": 64 + }, + "referralUrlId": { + "description": "The ID what was setup for a Distributor Merchant URL", + "type": "string", + "maxLength": 256 + }, + "applicationLevel": { + "description": "Current Application Level — i.e. BASIC, FULL", + "type": "string", + "readOnly": true, + "enum": [ + "BASIC", + "FULL" + ] + }, + "applicationStatus": { + "description": "The current status of the application", + "type": "string", + "readOnly": true, + "enum": [ + "INCOMPLETE", + "PENDING_FULL_APPLICATION", + "IN_REVIEW", + "APPROVED", + "DECLINED" + ] + } + } + }, + "intent": { + "description": "Identifies the type of onboarding application that is being requested for the commerce account", + "type": "string", + "default": "CREATE_BUSINESS", + "enum": [ + "CREATE_BUSINESS", + "ADD_STORE", + "ADD_CHANNEL", + "ADD_PRODUCT" + ] + }, + "products": { + "description": "List of GoDaddy product that can be added to the commerce account e.g., e.g., GD Payments, GD Debit card, GD Loans etc.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/product.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Product", + "description": "GoDaddy product that can be added to the commerce account e.g., e.g., GD Payments, GD Debit card, GD Loans etc.", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the product", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Product name", + "type": "string", + "enum": [ + "PAYMENTS" + ] + }, + "features": { + "description": "Optional capabilities/functionalities associated with GoDaddy offered Product", + "type": "array", + "items": { + "type": "string", + "default": [], + "enum": [ + "TIP_ENABLED" + ] + } + } + } + } + }, + "commerceAccountFeatures": { + "description": "Optional capabilities/functionalities associated with commerce account", + "type": "array", + "items": { + "type": "string", + "default": [], + "enum": [ + "NO_EMAIL_COMMUNICATIONS" + ] + } + } + }, + "required": [ + "intent" + ] } ], "properties": { @@ -132,17 +2006,261 @@ "description": "An array of error-related HATEOAS links.", "readOnly": true, "items": { - "$ref": "./common-types/link-description.json" + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] } } } } }, "404": { - "description": "See #/components/responses/notFound" + "description": "Not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.onboarding:read", "commerce.onboarding:write"] + "scopes": [ + "commerce.onboarding:read", + "commerce.onboarding:write" + ] }, { "operationId": "patchOnboardingApplication", @@ -164,24 +2282,889 @@ "required": false, "contentType": "application/json", "schema": { - "$ref": "./common-types/patch-request.json" + "$id": "https://godaddy.com/schemas/common/patch-request.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "title": "Patch Request", + "description": "An array of JSON patch objects to apply partial updates to resources.", + "items": { + "$id": "https://godaddy.com/schemas/common/patch.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Patch", + "description": "The JSON patch object to apply partial updates to resources.", + "properties": { + "op": { + "type": "string", + "description": "The operation to complete.", + "enum": [ + "add", + "remove", + "replace", + "move", + "copy", + "test" + ] + }, + "path": { + "type": "string", + "description": "The JSON pointer to the target document location at which to complete the operation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ], + "nullable": true, + "description": "The value to apply. The `remove` operation does not require a value." + }, + "from": { + "type": "string", + "description": "The JSON pointer to the target document location from which to move the value. Required for the `move` operation." + } + }, + "required": [ + "op" + ] + } } }, "responses": { "200": { "description": "Updated onboarding application", "schema": { - "$ref": "./models/Application.yaml" + "$id": "https://godaddy.com/schemas/commerce/onboarding/application-request.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Onboarding Application", + "type": "object", + "description": "This model represents the application which is use to begin the onboarding process", + "properties": { + "id": { + "description": "Unique ID for the application", + "type": "string", + "readOnly": true + }, + "individuals": { + "description": "A list of applicants", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/individual.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Individual", + "description": "Business account owner or the person filling out the application (applicant)", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the Individual", + "type": "string", + "readOnly": true + }, + "address": { + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "description": "An internationalized postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) from Google's Address Data Service and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute).", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "customerId": { + "description": "Unique ID for GoDaddy customer", + "type": "string", + "format": "uuid" + }, + "email": { + "$id": "https://godaddy.com/schemas/common/email-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A valid, internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.", + "type": "string", + "minLength": 3, + "maxLength": 254, + "pattern": "^.+@[^\"\\-].+$" + }, + "phone": { + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "description": "The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en).", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "firstName": { + "description": "First name of the applicant", + "type": "string", + "minLength": 2, + "maxLength": 64 + }, + "ip": { + "description": "IP Address of the applicant", + "type": "string", + "format": "ipv4" + }, + "lastName": { + "description": "Last name of the applicant", + "type": "string", + "minLength": 2, + "maxLength": 64 + }, + "leadId": { + "description": "Unique Lead ID", + "type": "string", + "maxLength": 64 + }, + "type": { + "description": "Type of applicant", + "type": "string", + "default": "APPLICANT", + "enum": [ + "APPLICANT", + "OWNER", + "OWNER_APPLICANT" + ] + }, + "userId": { + "description": "Unique User ID", + "type": "string", + "maxLength": 64 + }, + "visitorId": { + "description": "The visitor id that was created during an anonymous visit", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "email" + ] + } + }, + "company": null, + "store": null, + "channel": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Channel", + "description": "An abstraction of data to create a channel", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the channel", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Channel name", + "type": "string", + "minLength": 3, + "maxLength": 128 + }, + "externalChannelId": { + "description": "Unique ID what represents an external resource", + "type": "string", + "maxLength": 36 + }, + "externalChannelType": { + "description": "A term what represents the external channel id", + "type": "string", + "maxLength": 128 + } + }, + "required": [ + "name" + ] + }, + "metadata": { + "description": "Additional parameters to create a specific type of application", + "type": "object", + "properties": { + "businessId": { + "description": "Unique ID for the business", + "type": "string", + "format": "uuid" + }, + "storeId": { + "description": "Unique ID for the store", + "type": "string", + "format": "uuid" + }, + "channelId": { + "description": "Unique ID for the channel", + "type": "string", + "format": "uuid" + }, + "context": { + "description": "Header context", + "type": "string", + "maxLength": 1024 + }, + "medium": { + "description": "The page or entity relating to this account. Ex. FacebookLP, Email, My Account", + "type": "string", + "maxLength": 64 + }, + "source": { + "description": "The point of origin that started this process", + "type": "string", + "maxLength": 64 + }, + "referralUrlId": { + "description": "The ID what was setup for a Distributor Merchant URL", + "type": "string", + "maxLength": 256 + }, + "applicationLevel": { + "description": "Current Application Level — i.e. BASIC, FULL", + "type": "string", + "readOnly": true, + "enum": [ + "BASIC", + "FULL" + ] + }, + "applicationStatus": { + "description": "The current status of the application", + "type": "string", + "readOnly": true, + "enum": [ + "INCOMPLETE", + "PENDING_FULL_APPLICATION", + "IN_REVIEW", + "APPROVED", + "DECLINED" + ] + } + } + }, + "intent": { + "description": "Identifies the type of onboarding application that is being requested for the commerce account", + "type": "string", + "default": "CREATE_BUSINESS", + "enum": [ + "CREATE_BUSINESS", + "ADD_STORE", + "ADD_CHANNEL", + "ADD_PRODUCT" + ] + }, + "products": { + "description": "List of GoDaddy product that can be added to the commerce account e.g., e.g., GD Payments, GD Debit card, GD Loans etc.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/product.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Product", + "description": "GoDaddy product that can be added to the commerce account e.g., e.g., GD Payments, GD Debit card, GD Loans etc.", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the product", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Product name", + "type": "string", + "enum": [ + "PAYMENTS" + ] + }, + "features": { + "description": "Optional capabilities/functionalities associated with GoDaddy offered Product", + "type": "array", + "items": { + "type": "string", + "default": [], + "enum": [ + "TIP_ENABLED" + ] + } + } + } + } + }, + "commerceAccountFeatures": { + "description": "Optional capabilities/functionalities associated with commerce account", + "type": "array", + "items": { + "type": "string", + "default": [], + "enum": [ + "NO_EMAIL_COMMUNICATIONS" + ] + } + } + }, + "required": [ + "intent" + ] } }, "400": { - "description": "See #/components/responses/badRequest" + "description": "Bad request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "404": { - "description": "See #/components/responses/notFound" + "description": "Not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.onboarding:write"] + "scopes": [ + "commerce.onboarding:write" + ] }, { "operationId": "patchOnboardingApplication", @@ -203,17 +3186,821 @@ "200": { "description": "Onboarded an existing onboarding application", "schema": { - "$ref": "./models/Application.yaml" + "$id": "https://godaddy.com/schemas/commerce/onboarding/application-request.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Onboarding Application", + "type": "object", + "description": "This model represents the application which is use to begin the onboarding process", + "properties": { + "id": { + "description": "Unique ID for the application", + "type": "string", + "readOnly": true + }, + "individuals": { + "description": "A list of applicants", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/individual.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Individual", + "description": "Business account owner or the person filling out the application (applicant)", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the Individual", + "type": "string", + "readOnly": true + }, + "address": { + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "description": "An internationalized postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) from Google's Address Data Service and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute).", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "customerId": { + "description": "Unique ID for GoDaddy customer", + "type": "string", + "format": "uuid" + }, + "email": { + "$id": "https://godaddy.com/schemas/common/email-address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A valid, internationalized email address. Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.", + "type": "string", + "minLength": 3, + "maxLength": 254, + "pattern": "^.+@[^\"\\-].+$" + }, + "phone": { + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "description": "The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en).", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "firstName": { + "description": "First name of the applicant", + "type": "string", + "minLength": 2, + "maxLength": 64 + }, + "ip": { + "description": "IP Address of the applicant", + "type": "string", + "format": "ipv4" + }, + "lastName": { + "description": "Last name of the applicant", + "type": "string", + "minLength": 2, + "maxLength": 64 + }, + "leadId": { + "description": "Unique Lead ID", + "type": "string", + "maxLength": 64 + }, + "type": { + "description": "Type of applicant", + "type": "string", + "default": "APPLICANT", + "enum": [ + "APPLICANT", + "OWNER", + "OWNER_APPLICANT" + ] + }, + "userId": { + "description": "Unique User ID", + "type": "string", + "maxLength": 64 + }, + "visitorId": { + "description": "The visitor id that was created during an anonymous visit", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "email" + ] + } + }, + "company": null, + "store": null, + "channel": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/store.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Channel", + "description": "An abstraction of data to create a channel", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the channel", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Channel name", + "type": "string", + "minLength": 3, + "maxLength": 128 + }, + "externalChannelId": { + "description": "Unique ID what represents an external resource", + "type": "string", + "maxLength": 36 + }, + "externalChannelType": { + "description": "A term what represents the external channel id", + "type": "string", + "maxLength": 128 + } + }, + "required": [ + "name" + ] + }, + "metadata": { + "description": "Additional parameters to create a specific type of application", + "type": "object", + "properties": { + "businessId": { + "description": "Unique ID for the business", + "type": "string", + "format": "uuid" + }, + "storeId": { + "description": "Unique ID for the store", + "type": "string", + "format": "uuid" + }, + "channelId": { + "description": "Unique ID for the channel", + "type": "string", + "format": "uuid" + }, + "context": { + "description": "Header context", + "type": "string", + "maxLength": 1024 + }, + "medium": { + "description": "The page or entity relating to this account. Ex. FacebookLP, Email, My Account", + "type": "string", + "maxLength": 64 + }, + "source": { + "description": "The point of origin that started this process", + "type": "string", + "maxLength": 64 + }, + "referralUrlId": { + "description": "The ID what was setup for a Distributor Merchant URL", + "type": "string", + "maxLength": 256 + }, + "applicationLevel": { + "description": "Current Application Level — i.e. BASIC, FULL", + "type": "string", + "readOnly": true, + "enum": [ + "BASIC", + "FULL" + ] + }, + "applicationStatus": { + "description": "The current status of the application", + "type": "string", + "readOnly": true, + "enum": [ + "INCOMPLETE", + "PENDING_FULL_APPLICATION", + "IN_REVIEW", + "APPROVED", + "DECLINED" + ] + } + } + }, + "intent": { + "description": "Identifies the type of onboarding application that is being requested for the commerce account", + "type": "string", + "default": "CREATE_BUSINESS", + "enum": [ + "CREATE_BUSINESS", + "ADD_STORE", + "ADD_CHANNEL", + "ADD_PRODUCT" + ] + }, + "products": { + "description": "List of GoDaddy product that can be added to the commerce account e.g., e.g., GD Payments, GD Debit card, GD Loans etc.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/onboarding/product.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Product", + "description": "GoDaddy product that can be added to the commerce account e.g., e.g., GD Payments, GD Debit card, GD Loans etc.", + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the product", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Product name", + "type": "string", + "enum": [ + "PAYMENTS" + ] + }, + "features": { + "description": "Optional capabilities/functionalities associated with GoDaddy offered Product", + "type": "array", + "items": { + "type": "string", + "default": [], + "enum": [ + "TIP_ENABLED" + ] + } + } + } + } + }, + "commerceAccountFeatures": { + "description": "Optional capabilities/functionalities associated with commerce account", + "type": "array", + "items": { + "type": "string", + "default": [], + "enum": [ + "NO_EMAIL_COMMUNICATIONS" + ] + } + } + }, + "required": [ + "intent" + ] } }, "400": { - "description": "See #/components/responses/badRequest" + "description": "Bad request", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "404": { - "description": "See #/components/responses/notFound" + "description": "Not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.onboarding:write"] + "scopes": [ + "commerce.onboarding:write" + ] } ] -} +} \ No newline at end of file diff --git a/src/cli/schemas/api/orders.json b/src/cli/schemas/api/orders.json index 1445fb6..8545785 100644 --- a/src/cli/schemas/api/orders.json +++ b/src/cli/schemas/api/orders.json @@ -2,7 +2,7 @@ "name": "orders", "title": "Order Service", "description": "This API can be used for creating, updating, canceling and retrieving orders as well as archiving and retrieving archived orders related to a store.", - "version": "1.10.0", + "version": "1.11.0", "baseUrl": "https://api.godaddy.com", "endpoints": [ { @@ -18,147 +18,56695 @@ "required": true, "description": "Store ID", "schema": { - "$ref": "./models/Order.yaml#/properties/context/properties/storeId" + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + } + ], + "requestBody": { + "required": true, + "description": "The order object to create", + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/orders/order.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "definitions": { + "tax": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "required": [ + "context", + "statuses", + "totals", + "lineItems", + "processedAt" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for the order. If provided, it must be a unique identifier at a channel level", + "example": "CI-C8ACE3DB52D7" + }, + "number": { + "type": "string", + "description": "The main number for the order. This is different from the `id` attribute, which is the `ID` of the order used by APIs. Uniqueness is not enforced. This number will show up in Order UIs to the merchant (C1).", + "example": "R409480421" + }, + "numberDisplay": { + "type": "string", + "description": "A human readable number handed out to customers (C2). Uniqueness is not enforced. For example at In-N-Out Burger, they assign an Order a `numberDisplay` from 1 - 100. Once the `numberDisplay` hits 100, the next Order has `numberDisplay` set to 1.", + "example": "110" + }, + "taxExempted": { + "type": "boolean", + "description": "Details whether the order is tax exempt", + "default": false + }, + "context": { + "type": "object", + "description": "Context for an order", + "required": [ + "channelId", + "storeId" + ], + "properties": { + "owner": { + "type": "string", + "description": "Owner creating the order in the order service. This is distinct from a channel. If not provided, the owner will be the Central Order Service", + "example": "urn:com.godaddy:poynt.commerce.order", + "default": "urn:com.godaddy:commerce.order" + }, + "channelId": { + "type": "string", + "description": "ID of the channel that the order belongs to", + "example": "54ee725f-8dee-4b0f-908b-e0334e6628f5" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "businessId": { + "type": "string", + "description": "ID of the business that the order belongs to", + "example": "5d370f50-05f8-4dc3-9b20-80a7552232b2" + }, + "ventureId": { + "type": "string", + "description": "ID of the venture that the order belongs to", + "example": "7226696b-1482-444e-ba03-cd07bbe97d45" + } + } + }, + "statuses": { + "type": "object", + "description": "Current fulfillment status, payment status, and main status for the order", + "required": [ + "status", + "paymentStatus", + "fulfillmentStatus" + ], + "properties": { + "status": { + "description": "Possible statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/order-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Status", + "type": "string", + "enum": [ + "OPEN", + "COMPLETED", + "CANCELED", + "DRAFT" + ] + }, + "paymentStatus": { + "description": "Possible payment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/payment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Status", + "type": "string", + "enum": [ + "NONE", + "PROCESSING", + "PARTIALLY_PAID", + "PAID", + "PARTIALLY_REFUNDED", + "REFUNDED", + "CANCELED", + "PENDING", + "EXTERNALLY_PROCESSED", + "FAILED" + ] + }, + "fulfillmentStatus": { + "description": "Possible fulfillment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + } + } + }, + "totals": { + "description": "Grouped totals for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/total.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Total", + "type": "object", + "required": [ + "subTotal", + "shippingTotal", + "discountTotal", + "feeTotal", + "taxTotal", + "total" + ], + "properties": { + "subTotal": { + "description": "Money object with the sum of item subtotals for an order.\nFormula: Sum of all lineItems[].totals.subTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping totals for an order.\nFormula: Sum of all shippingLines[].totals.total\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal + Sum of all shippingLines[].totals.discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "productDiscountTotal": { + "description": "Money object with the sum of all product discounts for an order.\nFormula: Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingDiscountTotal": { + "description": "Money object with the sum of all shipping discounts for an order.\nFormula: Sum of all shippingLines[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fees for an order.\nFormula: Sum of all fees[].amount + Sum of all lineItems[].totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all taxes.filter(f => f.additional === true)[].amount + Sum of all lineItems[].totals.taxTotal + Sum of all shippingLines[].totals.taxTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Sum of all lineItems[].totals.addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all item, shipping, discount, fee, and tax totals.\nFormula: subTotal + shippingTotal + feeTotal + taxTotal - discountTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped totals for returns associated with an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/order-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "OrderReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "customerId": { + "type": "string", + "description": "Reference to a Customer as defined by the Connections service" + }, + "cartId": { + "type": "string", + "description": "ID associated with a cart. Used to link orders and carts for Inventory tracking purposes" + }, + "billing": { + "description": "Order level billing information", + "$id": "https://godaddy.com/schemas/commerce/orders/billing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Billing", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the billing info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the billing info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the billing info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the billing info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the billing info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with billing", + "format": "email", + "example": "test-billing@gmail.com" + } + } + }, + "shipping": { + "description": "Order level shipping information", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "lineItems": { + "type": "array", + "description": "Line items for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/line-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "required": [ + "type", + "name", + "fulfillmentMode", + "status", + "totals", + "unitAmount", + "quantity" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the line item (LineItem_). Auto-generated by the service on creation", + "readOnly": true, + "example": "LineItem_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for this line item", + "example": "CI-C8ACE3DB52D7" + }, + "type": { + "description": "Possible types for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item Type", + "type": "string", + "enum": [ + "PHYSICAL", + "DIGITAL", + "ALL", + "SERVICE", + "STAY", + "PAY_LINK" + ] + }, + "name": { + "type": "string", + "description": "Name of the line item used for display purposes to the merchant and customer" + }, + "status": { + "description": "Possible fulfillment statuses for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + }, + "fulfillmentMode": { + "description": "Possible fulfillment modes for a line item", + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + }, + "fulfillmentChannelId": { + "type": "string", + "description": "ID of the fulfillment channel for the line item" + }, + "totals": { + "type": "object", + "description": "Grouped totals for a line item", + "required": [ + "discountTotal", + "feeTotal", + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "lineItem.quantity * lineItem.unitAmount + addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all lineItem.discounts[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Sum of all lineItem.fees[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all lineItem.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "lineItem.quantity * (Sum of all lineItem.details.selectedAddons[].values[].costAdjustment)", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "subTotal + feeTotal + taxTotal + addonsTotal - discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped return totals for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "LineItemReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "unitAmount": { + "description": "The base price of the line item including add-ons, but excluding taxes, fees, discounts. Deprecated and will become read-only in the future.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "quantity": { + "type": "number", + "description": "Quantity purchased by the customer. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "returnQuantity": { + "type": "number", + "description": "Sum of all return quantities for the line item", + "format": "float", + "readOnly": true + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the V1 Catalog service" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the V2 Catalog service" + }, + "skuGroupId": { + "type": "string", + "description": "Reference to a SKU Group entity as defined by the V2 Catalog service." + }, + "details": { + "type": "object", + "description": "All detailed information for a line item - sku, selectedOptions, assetUrl, etc.", + "properties": { + "sku": { + "type": "string", + "description": "SKU of the product. SKU is not required because some consumers do not make SKU a required field when adding a product" + }, + "productAssetUrl": { + "type": "string", + "description": "Product's associated asset URL. This can be an image thumbnail, video URL, etc." + }, + "unitOfMeasure": { + "type": "string", + "description": "Product's unit of measure. Helps denote what was sold. If the line item purchased was grapes, the unit of measure could be set to `LBS`" + }, + "selectedAddons": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected add-ons", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the add-on", + "example": "Pizza Toppings" + }, + "sku": { + "type": "string", + "description": "SKU of the add-on. Certain systems set a SKU per add-on type" + }, + "values": { + "type": "array", + "items": { + "type": "object", + "description": "An add-on can have multiple values. For example a pizza with a Toppings add-on: `Mushrooms: +$0.00`, `Spinach: +$0.00`, and `Sausage: +$1.00`", + "required": [ + "name", + "costAdjustment" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the add-on value", + "example": "Sausage: +$1.00" + }, + "amount": { + "description": "Money object with the amount increase/decrease associated with the add-on value", + "deprecated": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "amountIncreased": { + "type": "boolean", + "description": "Determines whether the add-on amount increases or decreases the price of the line item", + "default": true, + "deprecated": true + }, + "costAdjustment": { + "description": "Cost increase/decrease associated with the add-on value. The value can be negative, unlike other amount fields across the Order schema", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + } + } + } + } + }, + "selectedOptions": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected options", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the option type", + "example": "Size" + }, + "values": { + "type": "array", + "description": "Array of option values with string values", + "items": { + "type": "string", + "example": "Red" + } + } + } + } + } + } + }, + "shipping": { + "description": "Shipping info associated to the line item. If not present, we assume the line item's shipping info is identical to the order's main shipping info", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this line item", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of a line item that does not change", + "example": "FREE_SHIPPING" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Single note field for backwards compatibility - use notes array for new implementations", + "deprecated": true + }, + "serviceStartAt": { + "description": "Datetime used to mark the start of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "serviceEndsAt": { + "description": "Datetime used to mark the end of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "discounts": { + "type": "array", + "description": "Discounts for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfilledAt": { + "description": "The datetime when the line item was fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "returnedAt": { + "description": "The datetime when the line item was returned", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the line item was refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the line item was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the line item was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order schema" + }, + "metafields": { + "type": "array", + "description": "Custom metadata fields for the line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfillmentModes": { + "type": "array", + "description": "Fulfillment modes used across line items for the order", + "readOnly": true, + "items": { + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "description": "Possible fulfillment modes for a line item", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + } + }, + "shippingLines": { + "type": "array", + "description": "Shipping lines for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/shipping-line.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Line", + "type": "object", + "description": "A shipping line details a shipping method used for an order", + "required": [ + "name", + "amount", + "totals" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipping line (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALICx6zxHI32ryuEYDInf8Ck" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "name": { + "type": "string", + "description": "The name of the shipping line for display purposes" + }, + "amount": { + "description": "Shipping cost before taxes", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "totals": { + "type": "object", + "description": "Grouped totals for a shipping line", + "required": [ + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "Subtotal (excluding taxes) for a shipping line. Currently the same as amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all shippingLine.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Total discounts applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Total fees applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Total amount for the shipping line including all taxes, discounts, and fees.\nFormula: totals.subTotal + totals.taxTotal - totals.discountTotal + totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "requestedProvider": { + "type": "string", + "description": "Shipping provider requested by buyer (`UPS`, `USPS`, etc.)" + }, + "requestedService": { + "type": "string", + "description": "Shipping service requested by buyer (`2nd Day`, `Priority`, `Express` etc.)" + }, + "taxes": { + "type": "array", + "description": "Taxes for a shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a shipping line", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/order-tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Tax", + "type": "object", + "description": "A Order tax is applied at the broad order level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "additional": { + "type": "boolean", + "description": "Determines if the tax object is an additional tax (true) or an aggregate (false) of line item taxes. Useful for display and charge purposes", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "links": { + "type": "array", + "readOnly": true, + "description": "List of links associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to the order", + "required": [ + "eventName", + "eventData", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "ORDER.CREATED" + }, + "eventData": { + "type": "string", + "description": "Data associated with this event", + "format": "json" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "transactionIds": { + "type": "array", + "description": "List of transactions as defined by the Transaction Service associated with the order", + "items": { + "type": "string", + "description": "Transaction ID" + } + }, + "staffUserIds": { + "type": "array", + "description": "Staff users associated with the order", + "maxItems": 5, + "items": { + "type": "string", + "description": "Staff user identifier" + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this order", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of an order that does not change", + "example": "has_digital_goods" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Deprecated note field - use notes array instead", + "deprecated": true + }, + "inventoryAction": { + "type": "string", + "description": "The action to take on inventory when the order is placed. Defaults to `AUTO_ADJUST`.", + "$id": "https://godaddy.com/schemas/commerce/orders/inventory-action.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Inventory Action" + }, + "processedAt": { + "description": "The datetime when the order was processed/placed. If you're importing orders from an app or another platform, then you can set `processedAt` to a datetime in the past to match when the original order was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archived": { + "type": "boolean", + "description": "Whether the order is archived", + "deprecated": true, + "default": false + }, + "archivedAt": { + "description": "The datetime when the order was archived", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The datetime when the order was canceled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "completedAt": { + "description": "The datetime when the order was completed", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "paidAt": { + "description": "The datetime when the order was completely paid", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "fulfilledAt": { + "description": "The datetime when the order was completely fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the order was completely refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the order was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the order was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order. Changes whenever the order is updated." + } + } + } + }, + "responses": { + "200": { + "description": "Successfully created the order", + "schema": { + "type": "object", + "title": "OrderCreated", + "required": [ + "status", + "order" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "order": { + "$id": "https://godaddy.com/schemas/commerce/orders/order.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "definitions": { + "tax": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "required": [ + "context", + "statuses", + "totals", + "lineItems", + "processedAt" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for the order. If provided, it must be a unique identifier at a channel level", + "example": "CI-C8ACE3DB52D7" + }, + "number": { + "type": "string", + "description": "The main number for the order. This is different from the `id` attribute, which is the `ID` of the order used by APIs. Uniqueness is not enforced. This number will show up in Order UIs to the merchant (C1).", + "example": "R409480421" + }, + "numberDisplay": { + "type": "string", + "description": "A human readable number handed out to customers (C2). Uniqueness is not enforced. For example at In-N-Out Burger, they assign an Order a `numberDisplay` from 1 - 100. Once the `numberDisplay` hits 100, the next Order has `numberDisplay` set to 1.", + "example": "110" + }, + "taxExempted": { + "type": "boolean", + "description": "Details whether the order is tax exempt", + "default": false + }, + "context": { + "type": "object", + "description": "Context for an order", + "required": [ + "channelId", + "storeId" + ], + "properties": { + "owner": { + "type": "string", + "description": "Owner creating the order in the order service. This is distinct from a channel. If not provided, the owner will be the Central Order Service", + "example": "urn:com.godaddy:poynt.commerce.order", + "default": "urn:com.godaddy:commerce.order" + }, + "channelId": { + "type": "string", + "description": "ID of the channel that the order belongs to", + "example": "54ee725f-8dee-4b0f-908b-e0334e6628f5" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "businessId": { + "type": "string", + "description": "ID of the business that the order belongs to", + "example": "5d370f50-05f8-4dc3-9b20-80a7552232b2" + }, + "ventureId": { + "type": "string", + "description": "ID of the venture that the order belongs to", + "example": "7226696b-1482-444e-ba03-cd07bbe97d45" + } + } + }, + "statuses": { + "type": "object", + "description": "Current fulfillment status, payment status, and main status for the order", + "required": [ + "status", + "paymentStatus", + "fulfillmentStatus" + ], + "properties": { + "status": { + "description": "Possible statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/order-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Status", + "type": "string", + "enum": [ + "OPEN", + "COMPLETED", + "CANCELED", + "DRAFT" + ] + }, + "paymentStatus": { + "description": "Possible payment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/payment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Status", + "type": "string", + "enum": [ + "NONE", + "PROCESSING", + "PARTIALLY_PAID", + "PAID", + "PARTIALLY_REFUNDED", + "REFUNDED", + "CANCELED", + "PENDING", + "EXTERNALLY_PROCESSED", + "FAILED" + ] + }, + "fulfillmentStatus": { + "description": "Possible fulfillment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + } + } + }, + "totals": { + "description": "Grouped totals for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/total.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Total", + "type": "object", + "required": [ + "subTotal", + "shippingTotal", + "discountTotal", + "feeTotal", + "taxTotal", + "total" + ], + "properties": { + "subTotal": { + "description": "Money object with the sum of item subtotals for an order.\nFormula: Sum of all lineItems[].totals.subTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping totals for an order.\nFormula: Sum of all shippingLines[].totals.total\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal + Sum of all shippingLines[].totals.discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "productDiscountTotal": { + "description": "Money object with the sum of all product discounts for an order.\nFormula: Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingDiscountTotal": { + "description": "Money object with the sum of all shipping discounts for an order.\nFormula: Sum of all shippingLines[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fees for an order.\nFormula: Sum of all fees[].amount + Sum of all lineItems[].totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all taxes.filter(f => f.additional === true)[].amount + Sum of all lineItems[].totals.taxTotal + Sum of all shippingLines[].totals.taxTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Sum of all lineItems[].totals.addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all item, shipping, discount, fee, and tax totals.\nFormula: subTotal + shippingTotal + feeTotal + taxTotal - discountTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped totals for returns associated with an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/order-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "OrderReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "customerId": { + "type": "string", + "description": "Reference to a Customer as defined by the Connections service" + }, + "cartId": { + "type": "string", + "description": "ID associated with a cart. Used to link orders and carts for Inventory tracking purposes" + }, + "billing": { + "description": "Order level billing information", + "$id": "https://godaddy.com/schemas/commerce/orders/billing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Billing", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the billing info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the billing info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the billing info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the billing info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the billing info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with billing", + "format": "email", + "example": "test-billing@gmail.com" + } + } + }, + "shipping": { + "description": "Order level shipping information", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "lineItems": { + "type": "array", + "description": "Line items for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/line-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "required": [ + "type", + "name", + "fulfillmentMode", + "status", + "totals", + "unitAmount", + "quantity" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the line item (LineItem_). Auto-generated by the service on creation", + "readOnly": true, + "example": "LineItem_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for this line item", + "example": "CI-C8ACE3DB52D7" + }, + "type": { + "description": "Possible types for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item Type", + "type": "string", + "enum": [ + "PHYSICAL", + "DIGITAL", + "ALL", + "SERVICE", + "STAY", + "PAY_LINK" + ] + }, + "name": { + "type": "string", + "description": "Name of the line item used for display purposes to the merchant and customer" + }, + "status": { + "description": "Possible fulfillment statuses for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + }, + "fulfillmentMode": { + "description": "Possible fulfillment modes for a line item", + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + }, + "fulfillmentChannelId": { + "type": "string", + "description": "ID of the fulfillment channel for the line item" + }, + "totals": { + "type": "object", + "description": "Grouped totals for a line item", + "required": [ + "discountTotal", + "feeTotal", + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "lineItem.quantity * lineItem.unitAmount + addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all lineItem.discounts[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Sum of all lineItem.fees[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all lineItem.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "lineItem.quantity * (Sum of all lineItem.details.selectedAddons[].values[].costAdjustment)", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "subTotal + feeTotal + taxTotal + addonsTotal - discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped return totals for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "LineItemReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "unitAmount": { + "description": "The base price of the line item including add-ons, but excluding taxes, fees, discounts. Deprecated and will become read-only in the future.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "quantity": { + "type": "number", + "description": "Quantity purchased by the customer. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "returnQuantity": { + "type": "number", + "description": "Sum of all return quantities for the line item", + "format": "float", + "readOnly": true + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the V1 Catalog service" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the V2 Catalog service" + }, + "skuGroupId": { + "type": "string", + "description": "Reference to a SKU Group entity as defined by the V2 Catalog service." + }, + "details": { + "type": "object", + "description": "All detailed information for a line item - sku, selectedOptions, assetUrl, etc.", + "properties": { + "sku": { + "type": "string", + "description": "SKU of the product. SKU is not required because some consumers do not make SKU a required field when adding a product" + }, + "productAssetUrl": { + "type": "string", + "description": "Product's associated asset URL. This can be an image thumbnail, video URL, etc." + }, + "unitOfMeasure": { + "type": "string", + "description": "Product's unit of measure. Helps denote what was sold. If the line item purchased was grapes, the unit of measure could be set to `LBS`" + }, + "selectedAddons": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected add-ons", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the add-on", + "example": "Pizza Toppings" + }, + "sku": { + "type": "string", + "description": "SKU of the add-on. Certain systems set a SKU per add-on type" + }, + "values": { + "type": "array", + "items": { + "type": "object", + "description": "An add-on can have multiple values. For example a pizza with a Toppings add-on: `Mushrooms: +$0.00`, `Spinach: +$0.00`, and `Sausage: +$1.00`", + "required": [ + "name", + "costAdjustment" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the add-on value", + "example": "Sausage: +$1.00" + }, + "amount": { + "description": "Money object with the amount increase/decrease associated with the add-on value", + "deprecated": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "amountIncreased": { + "type": "boolean", + "description": "Determines whether the add-on amount increases or decreases the price of the line item", + "default": true, + "deprecated": true + }, + "costAdjustment": { + "description": "Cost increase/decrease associated with the add-on value. The value can be negative, unlike other amount fields across the Order schema", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + } + } + } + } + }, + "selectedOptions": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected options", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the option type", + "example": "Size" + }, + "values": { + "type": "array", + "description": "Array of option values with string values", + "items": { + "type": "string", + "example": "Red" + } + } + } + } + } + } + }, + "shipping": { + "description": "Shipping info associated to the line item. If not present, we assume the line item's shipping info is identical to the order's main shipping info", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this line item", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of a line item that does not change", + "example": "FREE_SHIPPING" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Single note field for backwards compatibility - use notes array for new implementations", + "deprecated": true + }, + "serviceStartAt": { + "description": "Datetime used to mark the start of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "serviceEndsAt": { + "description": "Datetime used to mark the end of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "discounts": { + "type": "array", + "description": "Discounts for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfilledAt": { + "description": "The datetime when the line item was fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "returnedAt": { + "description": "The datetime when the line item was returned", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the line item was refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the line item was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the line item was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order schema" + }, + "metafields": { + "type": "array", + "description": "Custom metadata fields for the line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfillmentModes": { + "type": "array", + "description": "Fulfillment modes used across line items for the order", + "readOnly": true, + "items": { + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "description": "Possible fulfillment modes for a line item", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + } + }, + "shippingLines": { + "type": "array", + "description": "Shipping lines for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/shipping-line.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Line", + "type": "object", + "description": "A shipping line details a shipping method used for an order", + "required": [ + "name", + "amount", + "totals" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipping line (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALICx6zxHI32ryuEYDInf8Ck" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "name": { + "type": "string", + "description": "The name of the shipping line for display purposes" + }, + "amount": { + "description": "Shipping cost before taxes", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "totals": { + "type": "object", + "description": "Grouped totals for a shipping line", + "required": [ + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "Subtotal (excluding taxes) for a shipping line. Currently the same as amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all shippingLine.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Total discounts applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Total fees applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Total amount for the shipping line including all taxes, discounts, and fees.\nFormula: totals.subTotal + totals.taxTotal - totals.discountTotal + totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "requestedProvider": { + "type": "string", + "description": "Shipping provider requested by buyer (`UPS`, `USPS`, etc.)" + }, + "requestedService": { + "type": "string", + "description": "Shipping service requested by buyer (`2nd Day`, `Priority`, `Express` etc.)" + }, + "taxes": { + "type": "array", + "description": "Taxes for a shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a shipping line", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/order-tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Tax", + "type": "object", + "description": "A Order tax is applied at the broad order level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "additional": { + "type": "boolean", + "description": "Determines if the tax object is an additional tax (true) or an aggregate (false) of line item taxes. Useful for display and charge purposes", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "links": { + "type": "array", + "readOnly": true, + "description": "List of links associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to the order", + "required": [ + "eventName", + "eventData", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "ORDER.CREATED" + }, + "eventData": { + "type": "string", + "description": "Data associated with this event", + "format": "json" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "transactionIds": { + "type": "array", + "description": "List of transactions as defined by the Transaction Service associated with the order", + "items": { + "type": "string", + "description": "Transaction ID" + } + }, + "staffUserIds": { + "type": "array", + "description": "Staff users associated with the order", + "maxItems": 5, + "items": { + "type": "string", + "description": "Staff user identifier" + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this order", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of an order that does not change", + "example": "has_digital_goods" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Deprecated note field - use notes array instead", + "deprecated": true + }, + "inventoryAction": { + "type": "string", + "description": "The action to take on inventory when the order is placed. Defaults to `AUTO_ADJUST`.", + "$id": "https://godaddy.com/schemas/commerce/orders/inventory-action.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Inventory Action" + }, + "processedAt": { + "description": "The datetime when the order was processed/placed. If you're importing orders from an app or another platform, then you can set `processedAt` to a datetime in the past to match when the original order was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archived": { + "type": "boolean", + "description": "Whether the order is archived", + "deprecated": true, + "default": false + }, + "archivedAt": { + "description": "The datetime when the order was archived", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The datetime when the order was canceled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "completedAt": { + "description": "The datetime when the order was completed", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "paidAt": { + "description": "The datetime when the order was completely paid", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "fulfilledAt": { + "description": "The datetime when the order was completely fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the order was completely refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the order was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the order was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order. Changes whenever the order is updated." + } + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.order:create" + ] + }, + { + "operationId": "putOrder", + "method": "PUT", + "path": "/v1/commerce/stores/{storeId}/orders", + "summary": "Create order with identifier", + "description": "Create an order with a specified identifier", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + } + ], + "requestBody": { + "required": true, + "description": "The order object to create with a passed in Global ID (e.g. `Order_`)", + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/orders/order.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "definitions": { + "tax": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "required": [ + "context", + "statuses", + "totals", + "lineItems", + "processedAt" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for the order. If provided, it must be a unique identifier at a channel level", + "example": "CI-C8ACE3DB52D7" + }, + "number": { + "type": "string", + "description": "The main number for the order. This is different from the `id` attribute, which is the `ID` of the order used by APIs. Uniqueness is not enforced. This number will show up in Order UIs to the merchant (C1).", + "example": "R409480421" + }, + "numberDisplay": { + "type": "string", + "description": "A human readable number handed out to customers (C2). Uniqueness is not enforced. For example at In-N-Out Burger, they assign an Order a `numberDisplay` from 1 - 100. Once the `numberDisplay` hits 100, the next Order has `numberDisplay` set to 1.", + "example": "110" + }, + "taxExempted": { + "type": "boolean", + "description": "Details whether the order is tax exempt", + "default": false + }, + "context": { + "type": "object", + "description": "Context for an order", + "required": [ + "channelId", + "storeId" + ], + "properties": { + "owner": { + "type": "string", + "description": "Owner creating the order in the order service. This is distinct from a channel. If not provided, the owner will be the Central Order Service", + "example": "urn:com.godaddy:poynt.commerce.order", + "default": "urn:com.godaddy:commerce.order" + }, + "channelId": { + "type": "string", + "description": "ID of the channel that the order belongs to", + "example": "54ee725f-8dee-4b0f-908b-e0334e6628f5" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "businessId": { + "type": "string", + "description": "ID of the business that the order belongs to", + "example": "5d370f50-05f8-4dc3-9b20-80a7552232b2" + }, + "ventureId": { + "type": "string", + "description": "ID of the venture that the order belongs to", + "example": "7226696b-1482-444e-ba03-cd07bbe97d45" + } + } + }, + "statuses": { + "type": "object", + "description": "Current fulfillment status, payment status, and main status for the order", + "required": [ + "status", + "paymentStatus", + "fulfillmentStatus" + ], + "properties": { + "status": { + "description": "Possible statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/order-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Status", + "type": "string", + "enum": [ + "OPEN", + "COMPLETED", + "CANCELED", + "DRAFT" + ] + }, + "paymentStatus": { + "description": "Possible payment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/payment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Status", + "type": "string", + "enum": [ + "NONE", + "PROCESSING", + "PARTIALLY_PAID", + "PAID", + "PARTIALLY_REFUNDED", + "REFUNDED", + "CANCELED", + "PENDING", + "EXTERNALLY_PROCESSED", + "FAILED" + ] + }, + "fulfillmentStatus": { + "description": "Possible fulfillment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + } + } + }, + "totals": { + "description": "Grouped totals for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/total.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Total", + "type": "object", + "required": [ + "subTotal", + "shippingTotal", + "discountTotal", + "feeTotal", + "taxTotal", + "total" + ], + "properties": { + "subTotal": { + "description": "Money object with the sum of item subtotals for an order.\nFormula: Sum of all lineItems[].totals.subTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping totals for an order.\nFormula: Sum of all shippingLines[].totals.total\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal + Sum of all shippingLines[].totals.discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "productDiscountTotal": { + "description": "Money object with the sum of all product discounts for an order.\nFormula: Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingDiscountTotal": { + "description": "Money object with the sum of all shipping discounts for an order.\nFormula: Sum of all shippingLines[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fees for an order.\nFormula: Sum of all fees[].amount + Sum of all lineItems[].totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all taxes.filter(f => f.additional === true)[].amount + Sum of all lineItems[].totals.taxTotal + Sum of all shippingLines[].totals.taxTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Sum of all lineItems[].totals.addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all item, shipping, discount, fee, and tax totals.\nFormula: subTotal + shippingTotal + feeTotal + taxTotal - discountTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped totals for returns associated with an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/order-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "OrderReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "customerId": { + "type": "string", + "description": "Reference to a Customer as defined by the Connections service" + }, + "cartId": { + "type": "string", + "description": "ID associated with a cart. Used to link orders and carts for Inventory tracking purposes" + }, + "billing": { + "description": "Order level billing information", + "$id": "https://godaddy.com/schemas/commerce/orders/billing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Billing", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the billing info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the billing info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the billing info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the billing info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the billing info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with billing", + "format": "email", + "example": "test-billing@gmail.com" + } + } + }, + "shipping": { + "description": "Order level shipping information", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "lineItems": { + "type": "array", + "description": "Line items for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/line-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "required": [ + "type", + "name", + "fulfillmentMode", + "status", + "totals", + "unitAmount", + "quantity" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the line item (LineItem_). Auto-generated by the service on creation", + "readOnly": true, + "example": "LineItem_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for this line item", + "example": "CI-C8ACE3DB52D7" + }, + "type": { + "description": "Possible types for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item Type", + "type": "string", + "enum": [ + "PHYSICAL", + "DIGITAL", + "ALL", + "SERVICE", + "STAY", + "PAY_LINK" + ] + }, + "name": { + "type": "string", + "description": "Name of the line item used for display purposes to the merchant and customer" + }, + "status": { + "description": "Possible fulfillment statuses for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + }, + "fulfillmentMode": { + "description": "Possible fulfillment modes for a line item", + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + }, + "fulfillmentChannelId": { + "type": "string", + "description": "ID of the fulfillment channel for the line item" + }, + "totals": { + "type": "object", + "description": "Grouped totals for a line item", + "required": [ + "discountTotal", + "feeTotal", + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "lineItem.quantity * lineItem.unitAmount + addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all lineItem.discounts[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Sum of all lineItem.fees[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all lineItem.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "lineItem.quantity * (Sum of all lineItem.details.selectedAddons[].values[].costAdjustment)", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "subTotal + feeTotal + taxTotal + addonsTotal - discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped return totals for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "LineItemReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "unitAmount": { + "description": "The base price of the line item including add-ons, but excluding taxes, fees, discounts. Deprecated and will become read-only in the future.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "quantity": { + "type": "number", + "description": "Quantity purchased by the customer. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "returnQuantity": { + "type": "number", + "description": "Sum of all return quantities for the line item", + "format": "float", + "readOnly": true + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the V1 Catalog service" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the V2 Catalog service" + }, + "skuGroupId": { + "type": "string", + "description": "Reference to a SKU Group entity as defined by the V2 Catalog service." + }, + "details": { + "type": "object", + "description": "All detailed information for a line item - sku, selectedOptions, assetUrl, etc.", + "properties": { + "sku": { + "type": "string", + "description": "SKU of the product. SKU is not required because some consumers do not make SKU a required field when adding a product" + }, + "productAssetUrl": { + "type": "string", + "description": "Product's associated asset URL. This can be an image thumbnail, video URL, etc." + }, + "unitOfMeasure": { + "type": "string", + "description": "Product's unit of measure. Helps denote what was sold. If the line item purchased was grapes, the unit of measure could be set to `LBS`" + }, + "selectedAddons": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected add-ons", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the add-on", + "example": "Pizza Toppings" + }, + "sku": { + "type": "string", + "description": "SKU of the add-on. Certain systems set a SKU per add-on type" + }, + "values": { + "type": "array", + "items": { + "type": "object", + "description": "An add-on can have multiple values. For example a pizza with a Toppings add-on: `Mushrooms: +$0.00`, `Spinach: +$0.00`, and `Sausage: +$1.00`", + "required": [ + "name", + "costAdjustment" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the add-on value", + "example": "Sausage: +$1.00" + }, + "amount": { + "description": "Money object with the amount increase/decrease associated with the add-on value", + "deprecated": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "amountIncreased": { + "type": "boolean", + "description": "Determines whether the add-on amount increases or decreases the price of the line item", + "default": true, + "deprecated": true + }, + "costAdjustment": { + "description": "Cost increase/decrease associated with the add-on value. The value can be negative, unlike other amount fields across the Order schema", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + } + } + } + } + }, + "selectedOptions": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected options", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the option type", + "example": "Size" + }, + "values": { + "type": "array", + "description": "Array of option values with string values", + "items": { + "type": "string", + "example": "Red" + } + } + } + } + } + } + }, + "shipping": { + "description": "Shipping info associated to the line item. If not present, we assume the line item's shipping info is identical to the order's main shipping info", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this line item", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of a line item that does not change", + "example": "FREE_SHIPPING" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Single note field for backwards compatibility - use notes array for new implementations", + "deprecated": true + }, + "serviceStartAt": { + "description": "Datetime used to mark the start of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "serviceEndsAt": { + "description": "Datetime used to mark the end of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "discounts": { + "type": "array", + "description": "Discounts for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfilledAt": { + "description": "The datetime when the line item was fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "returnedAt": { + "description": "The datetime when the line item was returned", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the line item was refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the line item was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the line item was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order schema" + }, + "metafields": { + "type": "array", + "description": "Custom metadata fields for the line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfillmentModes": { + "type": "array", + "description": "Fulfillment modes used across line items for the order", + "readOnly": true, + "items": { + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "description": "Possible fulfillment modes for a line item", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + } + }, + "shippingLines": { + "type": "array", + "description": "Shipping lines for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/shipping-line.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Line", + "type": "object", + "description": "A shipping line details a shipping method used for an order", + "required": [ + "name", + "amount", + "totals" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipping line (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALICx6zxHI32ryuEYDInf8Ck" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "name": { + "type": "string", + "description": "The name of the shipping line for display purposes" + }, + "amount": { + "description": "Shipping cost before taxes", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "totals": { + "type": "object", + "description": "Grouped totals for a shipping line", + "required": [ + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "Subtotal (excluding taxes) for a shipping line. Currently the same as amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all shippingLine.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Total discounts applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Total fees applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Total amount for the shipping line including all taxes, discounts, and fees.\nFormula: totals.subTotal + totals.taxTotal - totals.discountTotal + totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "requestedProvider": { + "type": "string", + "description": "Shipping provider requested by buyer (`UPS`, `USPS`, etc.)" + }, + "requestedService": { + "type": "string", + "description": "Shipping service requested by buyer (`2nd Day`, `Priority`, `Express` etc.)" + }, + "taxes": { + "type": "array", + "description": "Taxes for a shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a shipping line", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/order-tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Tax", + "type": "object", + "description": "A Order tax is applied at the broad order level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "additional": { + "type": "boolean", + "description": "Determines if the tax object is an additional tax (true) or an aggregate (false) of line item taxes. Useful for display and charge purposes", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "links": { + "type": "array", + "readOnly": true, + "description": "List of links associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to the order", + "required": [ + "eventName", + "eventData", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "ORDER.CREATED" + }, + "eventData": { + "type": "string", + "description": "Data associated with this event", + "format": "json" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "transactionIds": { + "type": "array", + "description": "List of transactions as defined by the Transaction Service associated with the order", + "items": { + "type": "string", + "description": "Transaction ID" + } + }, + "staffUserIds": { + "type": "array", + "description": "Staff users associated with the order", + "maxItems": 5, + "items": { + "type": "string", + "description": "Staff user identifier" + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this order", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of an order that does not change", + "example": "has_digital_goods" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Deprecated note field - use notes array instead", + "deprecated": true + }, + "inventoryAction": { + "type": "string", + "description": "The action to take on inventory when the order is placed. Defaults to `AUTO_ADJUST`.", + "$id": "https://godaddy.com/schemas/commerce/orders/inventory-action.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Inventory Action" + }, + "processedAt": { + "description": "The datetime when the order was processed/placed. If you're importing orders from an app or another platform, then you can set `processedAt` to a datetime in the past to match when the original order was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archived": { + "type": "boolean", + "description": "Whether the order is archived", + "deprecated": true, + "default": false + }, + "archivedAt": { + "description": "The datetime when the order was archived", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The datetime when the order was canceled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "completedAt": { + "description": "The datetime when the order was completed", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "paidAt": { + "description": "The datetime when the order was completely paid", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "fulfilledAt": { + "description": "The datetime when the order was completely fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the order was completely refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the order was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the order was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order. Changes whenever the order is updated." + } + } + } + }, + "responses": { + "200": { + "description": "Successfully created the order", + "schema": { + "type": "object", + "title": "OrderWithIdCreated", + "required": [ + "status", + "order" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "order": { + "$id": "https://godaddy.com/schemas/commerce/orders/order.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "definitions": { + "tax": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "required": [ + "context", + "statuses", + "totals", + "lineItems", + "processedAt" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for the order. If provided, it must be a unique identifier at a channel level", + "example": "CI-C8ACE3DB52D7" + }, + "number": { + "type": "string", + "description": "The main number for the order. This is different from the `id` attribute, which is the `ID` of the order used by APIs. Uniqueness is not enforced. This number will show up in Order UIs to the merchant (C1).", + "example": "R409480421" + }, + "numberDisplay": { + "type": "string", + "description": "A human readable number handed out to customers (C2). Uniqueness is not enforced. For example at In-N-Out Burger, they assign an Order a `numberDisplay` from 1 - 100. Once the `numberDisplay` hits 100, the next Order has `numberDisplay` set to 1.", + "example": "110" + }, + "taxExempted": { + "type": "boolean", + "description": "Details whether the order is tax exempt", + "default": false + }, + "context": { + "type": "object", + "description": "Context for an order", + "required": [ + "channelId", + "storeId" + ], + "properties": { + "owner": { + "type": "string", + "description": "Owner creating the order in the order service. This is distinct from a channel. If not provided, the owner will be the Central Order Service", + "example": "urn:com.godaddy:poynt.commerce.order", + "default": "urn:com.godaddy:commerce.order" + }, + "channelId": { + "type": "string", + "description": "ID of the channel that the order belongs to", + "example": "54ee725f-8dee-4b0f-908b-e0334e6628f5" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "businessId": { + "type": "string", + "description": "ID of the business that the order belongs to", + "example": "5d370f50-05f8-4dc3-9b20-80a7552232b2" + }, + "ventureId": { + "type": "string", + "description": "ID of the venture that the order belongs to", + "example": "7226696b-1482-444e-ba03-cd07bbe97d45" + } + } + }, + "statuses": { + "type": "object", + "description": "Current fulfillment status, payment status, and main status for the order", + "required": [ + "status", + "paymentStatus", + "fulfillmentStatus" + ], + "properties": { + "status": { + "description": "Possible statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/order-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Status", + "type": "string", + "enum": [ + "OPEN", + "COMPLETED", + "CANCELED", + "DRAFT" + ] + }, + "paymentStatus": { + "description": "Possible payment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/payment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Status", + "type": "string", + "enum": [ + "NONE", + "PROCESSING", + "PARTIALLY_PAID", + "PAID", + "PARTIALLY_REFUNDED", + "REFUNDED", + "CANCELED", + "PENDING", + "EXTERNALLY_PROCESSED", + "FAILED" + ] + }, + "fulfillmentStatus": { + "description": "Possible fulfillment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + } + } + }, + "totals": { + "description": "Grouped totals for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/total.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Total", + "type": "object", + "required": [ + "subTotal", + "shippingTotal", + "discountTotal", + "feeTotal", + "taxTotal", + "total" + ], + "properties": { + "subTotal": { + "description": "Money object with the sum of item subtotals for an order.\nFormula: Sum of all lineItems[].totals.subTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping totals for an order.\nFormula: Sum of all shippingLines[].totals.total\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal + Sum of all shippingLines[].totals.discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "productDiscountTotal": { + "description": "Money object with the sum of all product discounts for an order.\nFormula: Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingDiscountTotal": { + "description": "Money object with the sum of all shipping discounts for an order.\nFormula: Sum of all shippingLines[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fees for an order.\nFormula: Sum of all fees[].amount + Sum of all lineItems[].totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all taxes.filter(f => f.additional === true)[].amount + Sum of all lineItems[].totals.taxTotal + Sum of all shippingLines[].totals.taxTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Sum of all lineItems[].totals.addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all item, shipping, discount, fee, and tax totals.\nFormula: subTotal + shippingTotal + feeTotal + taxTotal - discountTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped totals for returns associated with an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/order-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "OrderReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "customerId": { + "type": "string", + "description": "Reference to a Customer as defined by the Connections service" + }, + "cartId": { + "type": "string", + "description": "ID associated with a cart. Used to link orders and carts for Inventory tracking purposes" + }, + "billing": { + "description": "Order level billing information", + "$id": "https://godaddy.com/schemas/commerce/orders/billing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Billing", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the billing info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the billing info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the billing info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the billing info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the billing info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with billing", + "format": "email", + "example": "test-billing@gmail.com" + } + } + }, + "shipping": { + "description": "Order level shipping information", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "lineItems": { + "type": "array", + "description": "Line items for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/line-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "required": [ + "type", + "name", + "fulfillmentMode", + "status", + "totals", + "unitAmount", + "quantity" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the line item (LineItem_). Auto-generated by the service on creation", + "readOnly": true, + "example": "LineItem_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for this line item", + "example": "CI-C8ACE3DB52D7" + }, + "type": { + "description": "Possible types for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item Type", + "type": "string", + "enum": [ + "PHYSICAL", + "DIGITAL", + "ALL", + "SERVICE", + "STAY", + "PAY_LINK" + ] + }, + "name": { + "type": "string", + "description": "Name of the line item used for display purposes to the merchant and customer" + }, + "status": { + "description": "Possible fulfillment statuses for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + }, + "fulfillmentMode": { + "description": "Possible fulfillment modes for a line item", + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + }, + "fulfillmentChannelId": { + "type": "string", + "description": "ID of the fulfillment channel for the line item" + }, + "totals": { + "type": "object", + "description": "Grouped totals for a line item", + "required": [ + "discountTotal", + "feeTotal", + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "lineItem.quantity * lineItem.unitAmount + addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all lineItem.discounts[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Sum of all lineItem.fees[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all lineItem.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "lineItem.quantity * (Sum of all lineItem.details.selectedAddons[].values[].costAdjustment)", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "subTotal + feeTotal + taxTotal + addonsTotal - discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped return totals for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "LineItemReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "unitAmount": { + "description": "The base price of the line item including add-ons, but excluding taxes, fees, discounts. Deprecated and will become read-only in the future.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "quantity": { + "type": "number", + "description": "Quantity purchased by the customer. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "returnQuantity": { + "type": "number", + "description": "Sum of all return quantities for the line item", + "format": "float", + "readOnly": true + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the V1 Catalog service" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the V2 Catalog service" + }, + "skuGroupId": { + "type": "string", + "description": "Reference to a SKU Group entity as defined by the V2 Catalog service." + }, + "details": { + "type": "object", + "description": "All detailed information for a line item - sku, selectedOptions, assetUrl, etc.", + "properties": { + "sku": { + "type": "string", + "description": "SKU of the product. SKU is not required because some consumers do not make SKU a required field when adding a product" + }, + "productAssetUrl": { + "type": "string", + "description": "Product's associated asset URL. This can be an image thumbnail, video URL, etc." + }, + "unitOfMeasure": { + "type": "string", + "description": "Product's unit of measure. Helps denote what was sold. If the line item purchased was grapes, the unit of measure could be set to `LBS`" + }, + "selectedAddons": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected add-ons", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the add-on", + "example": "Pizza Toppings" + }, + "sku": { + "type": "string", + "description": "SKU of the add-on. Certain systems set a SKU per add-on type" + }, + "values": { + "type": "array", + "items": { + "type": "object", + "description": "An add-on can have multiple values. For example a pizza with a Toppings add-on: `Mushrooms: +$0.00`, `Spinach: +$0.00`, and `Sausage: +$1.00`", + "required": [ + "name", + "costAdjustment" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the add-on value", + "example": "Sausage: +$1.00" + }, + "amount": { + "description": "Money object with the amount increase/decrease associated with the add-on value", + "deprecated": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "amountIncreased": { + "type": "boolean", + "description": "Determines whether the add-on amount increases or decreases the price of the line item", + "default": true, + "deprecated": true + }, + "costAdjustment": { + "description": "Cost increase/decrease associated with the add-on value. The value can be negative, unlike other amount fields across the Order schema", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + } + } + } + } + }, + "selectedOptions": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected options", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the option type", + "example": "Size" + }, + "values": { + "type": "array", + "description": "Array of option values with string values", + "items": { + "type": "string", + "example": "Red" + } + } + } + } + } + } + }, + "shipping": { + "description": "Shipping info associated to the line item. If not present, we assume the line item's shipping info is identical to the order's main shipping info", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this line item", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of a line item that does not change", + "example": "FREE_SHIPPING" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Single note field for backwards compatibility - use notes array for new implementations", + "deprecated": true + }, + "serviceStartAt": { + "description": "Datetime used to mark the start of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "serviceEndsAt": { + "description": "Datetime used to mark the end of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "discounts": { + "type": "array", + "description": "Discounts for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfilledAt": { + "description": "The datetime when the line item was fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "returnedAt": { + "description": "The datetime when the line item was returned", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the line item was refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the line item was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the line item was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order schema" + }, + "metafields": { + "type": "array", + "description": "Custom metadata fields for the line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfillmentModes": { + "type": "array", + "description": "Fulfillment modes used across line items for the order", + "readOnly": true, + "items": { + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "description": "Possible fulfillment modes for a line item", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + } + }, + "shippingLines": { + "type": "array", + "description": "Shipping lines for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/shipping-line.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Line", + "type": "object", + "description": "A shipping line details a shipping method used for an order", + "required": [ + "name", + "amount", + "totals" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipping line (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALICx6zxHI32ryuEYDInf8Ck" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "name": { + "type": "string", + "description": "The name of the shipping line for display purposes" + }, + "amount": { + "description": "Shipping cost before taxes", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "totals": { + "type": "object", + "description": "Grouped totals for a shipping line", + "required": [ + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "Subtotal (excluding taxes) for a shipping line. Currently the same as amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all shippingLine.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Total discounts applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Total fees applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Total amount for the shipping line including all taxes, discounts, and fees.\nFormula: totals.subTotal + totals.taxTotal - totals.discountTotal + totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "requestedProvider": { + "type": "string", + "description": "Shipping provider requested by buyer (`UPS`, `USPS`, etc.)" + }, + "requestedService": { + "type": "string", + "description": "Shipping service requested by buyer (`2nd Day`, `Priority`, `Express` etc.)" + }, + "taxes": { + "type": "array", + "description": "Taxes for a shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a shipping line", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/order-tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Tax", + "type": "object", + "description": "A Order tax is applied at the broad order level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "additional": { + "type": "boolean", + "description": "Determines if the tax object is an additional tax (true) or an aggregate (false) of line item taxes. Useful for display and charge purposes", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "links": { + "type": "array", + "readOnly": true, + "description": "List of links associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to the order", + "required": [ + "eventName", + "eventData", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "ORDER.CREATED" + }, + "eventData": { + "type": "string", + "description": "Data associated with this event", + "format": "json" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "transactionIds": { + "type": "array", + "description": "List of transactions as defined by the Transaction Service associated with the order", + "items": { + "type": "string", + "description": "Transaction ID" + } + }, + "staffUserIds": { + "type": "array", + "description": "Staff users associated with the order", + "maxItems": 5, + "items": { + "type": "string", + "description": "Staff user identifier" + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this order", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of an order that does not change", + "example": "has_digital_goods" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Deprecated note field - use notes array instead", + "deprecated": true + }, + "inventoryAction": { + "type": "string", + "description": "The action to take on inventory when the order is placed. Defaults to `AUTO_ADJUST`.", + "$id": "https://godaddy.com/schemas/commerce/orders/inventory-action.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Inventory Action" + }, + "processedAt": { + "description": "The datetime when the order was processed/placed. If you're importing orders from an app or another platform, then you can set `processedAt` to a datetime in the past to match when the original order was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archived": { + "type": "boolean", + "description": "Whether the order is archived", + "deprecated": true, + "default": false + }, + "archivedAt": { + "description": "The datetime when the order was archived", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The datetime when the order was canceled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "completedAt": { + "description": "The datetime when the order was completed", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "paidAt": { + "description": "The datetime when the order was completely paid", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "fulfilledAt": { + "description": "The datetime when the order was completely fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the order was completely refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the order was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the order was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order. Changes whenever the order is updated." + } + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.order:create" + ] + }, + { + "operationId": "queryOrders", + "method": "GET", + "path": "/v1/commerce/stores/{storeId}/orders", + "summary": "Find and filter orders", + "description": "Find orders and filter them using the criteria provided", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "A non-negative, non-zero integer indicating the maximum number of resouces to return at one time", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100, + "default": 25 + } + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "description": "Returns the resources that come after this specified cursor", + "schema": { + "type": "string", + "description": "A cursor for use in pagination", + "example": "MTY1MTc0NTczMDAwMDsyRzVWc1dFRmhJa3RIOFBZNHFDMGlPR0RwVko=" + } + }, + { + "name": "pageTokenDirection", + "in": "query", + "required": false, + "description": "Direction indicator used for cursor based pagination", + "schema": { + "type": "string", + "description": "Page token direction", + "enum": [ + "BACKWARD", + "FORWARD" + ], + "default": "FORWARD" + } + }, + { + "name": "processedAtStart", + "in": "query", + "required": false, + "description": "Grab orders with their processedAt => this datetime", + "schema": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + { + "name": "processedAtEnd", + "in": "query", + "required": false, + "description": "Grab orders with their processedAt <= this datetime", + "schema": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + { + "name": "updatedAtStart", + "in": "query", + "required": false, + "description": "Grab orders with their updatedAt => this datetime", + "schema": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + { + "name": "updatedAtEnd", + "in": "query", + "required": false, + "description": "Grab orders with their updatedAt <= this datetime", + "schema": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + { + "name": "status", + "in": "query", + "required": false, + "description": "Order status (comma separated)", + "schema": { + "type": "string", + "description": "List of order statuses (comma separated)", + "example": "OPEN,COMPLETED" + } + }, + { + "name": "paymentStatus", + "in": "query", + "required": false, + "description": "Order payment statuses (comma separated)", + "schema": { + "type": "string", + "description": "List of order payment statuses (comma separated)", + "example": "PROCESSING,PAID" + } + }, + { + "name": "fulfillmentStatus", + "in": "query", + "required": false, + "description": "Order fulfillment statuses (comma separated)", + "schema": { + "type": "string", + "description": "List of order fulfillment statuses (comma separated)", + "example": "UNFULFILLED,IN_PROGRESS" + } + }, + { + "name": "fulfillmentMode", + "in": "query", + "required": false, + "description": "Line item fulfillment mode - taken from line items (comma separated)", + "schema": { + "type": "string", + "description": "List of line item fulfillment modes (comma separated)", + "example": "PICKUP,SHIP" + } + }, + { + "name": "channelId", + "in": "query", + "required": false, + "description": "Channel ID(s) to filter orders by", + "schema": { + "type": "string", + "description": "List of order channelId (comma separated)", + "example": "7a65506f-d706-420b-a5ec-25c5bf69d000,0349f033-a556-49b7-9233-4edd39540112" + } + }, + { + "name": "name", + "in": "query", + "required": false, + "description": "Shipping / billing name to filter orders by", + "schema": { + "type": "string", + "description": "Shipping / billing name", + "example": "Bob Loblaw" + } + }, + { + "name": "email", + "in": "query", + "required": false, + "description": "Shipping / billing email(s) to filter orders by", + "schema": { + "type": "string", + "description": "Email(s)- comma separated", + "example": "bobloblaw@gmail.com,dirk-nowitzki@gmail.com" + } + }, + { + "name": "tags", + "in": "query", + "required": false, + "description": "Order tags to filter orders by", + "schema": { + "type": "string", + "description": "List of tags (comma separated)", + "example": "digital,poynt" + } + }, + { + "name": "sortBy", + "in": "query", + "required": false, + "description": "Sort the underlying orders by the given key", + "schema": { + "type": "string", + "description": "Key to sort orders by", + "enum": [ + "number", + "processedAt", + "total", + "status", + "fulfillmentStatus", + "paymentStatus", + "updatedAt" + ], + "default": "processedAt" + } + }, + { + "name": "sortOrder", + "in": "query", + "required": false, + "description": "Sort direction", + "schema": { + "type": "string", + "description": "Sort direction", + "enum": [ + "ASC", + "DESC" + ], + "default": "ASC" + } + } + ], + "responses": { + "200": { + "description": "Successfully listed orders", + "schema": { + "type": "object", + "title": "Orders", + "required": [ + "status", + "orders", + "links" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "orders": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/order.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "definitions": { + "tax": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "required": [ + "context", + "statuses", + "totals", + "lineItems", + "processedAt" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for the order. If provided, it must be a unique identifier at a channel level", + "example": "CI-C8ACE3DB52D7" + }, + "number": { + "type": "string", + "description": "The main number for the order. This is different from the `id` attribute, which is the `ID` of the order used by APIs. Uniqueness is not enforced. This number will show up in Order UIs to the merchant (C1).", + "example": "R409480421" + }, + "numberDisplay": { + "type": "string", + "description": "A human readable number handed out to customers (C2). Uniqueness is not enforced. For example at In-N-Out Burger, they assign an Order a `numberDisplay` from 1 - 100. Once the `numberDisplay` hits 100, the next Order has `numberDisplay` set to 1.", + "example": "110" + }, + "taxExempted": { + "type": "boolean", + "description": "Details whether the order is tax exempt", + "default": false + }, + "context": { + "type": "object", + "description": "Context for an order", + "required": [ + "channelId", + "storeId" + ], + "properties": { + "owner": { + "type": "string", + "description": "Owner creating the order in the order service. This is distinct from a channel. If not provided, the owner will be the Central Order Service", + "example": "urn:com.godaddy:poynt.commerce.order", + "default": "urn:com.godaddy:commerce.order" + }, + "channelId": { + "type": "string", + "description": "ID of the channel that the order belongs to", + "example": "54ee725f-8dee-4b0f-908b-e0334e6628f5" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "businessId": { + "type": "string", + "description": "ID of the business that the order belongs to", + "example": "5d370f50-05f8-4dc3-9b20-80a7552232b2" + }, + "ventureId": { + "type": "string", + "description": "ID of the venture that the order belongs to", + "example": "7226696b-1482-444e-ba03-cd07bbe97d45" + } + } + }, + "statuses": { + "type": "object", + "description": "Current fulfillment status, payment status, and main status for the order", + "required": [ + "status", + "paymentStatus", + "fulfillmentStatus" + ], + "properties": { + "status": { + "description": "Possible statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/order-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Status", + "type": "string", + "enum": [ + "OPEN", + "COMPLETED", + "CANCELED", + "DRAFT" + ] + }, + "paymentStatus": { + "description": "Possible payment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/payment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Status", + "type": "string", + "enum": [ + "NONE", + "PROCESSING", + "PARTIALLY_PAID", + "PAID", + "PARTIALLY_REFUNDED", + "REFUNDED", + "CANCELED", + "PENDING", + "EXTERNALLY_PROCESSED", + "FAILED" + ] + }, + "fulfillmentStatus": { + "description": "Possible fulfillment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + } + } + }, + "totals": { + "description": "Grouped totals for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/total.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Total", + "type": "object", + "required": [ + "subTotal", + "shippingTotal", + "discountTotal", + "feeTotal", + "taxTotal", + "total" + ], + "properties": { + "subTotal": { + "description": "Money object with the sum of item subtotals for an order.\nFormula: Sum of all lineItems[].totals.subTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping totals for an order.\nFormula: Sum of all shippingLines[].totals.total\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal + Sum of all shippingLines[].totals.discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "productDiscountTotal": { + "description": "Money object with the sum of all product discounts for an order.\nFormula: Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingDiscountTotal": { + "description": "Money object with the sum of all shipping discounts for an order.\nFormula: Sum of all shippingLines[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fees for an order.\nFormula: Sum of all fees[].amount + Sum of all lineItems[].totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all taxes.filter(f => f.additional === true)[].amount + Sum of all lineItems[].totals.taxTotal + Sum of all shippingLines[].totals.taxTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Sum of all lineItems[].totals.addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all item, shipping, discount, fee, and tax totals.\nFormula: subTotal + shippingTotal + feeTotal + taxTotal - discountTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped totals for returns associated with an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/order-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "OrderReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "customerId": { + "type": "string", + "description": "Reference to a Customer as defined by the Connections service" + }, + "cartId": { + "type": "string", + "description": "ID associated with a cart. Used to link orders and carts for Inventory tracking purposes" + }, + "billing": { + "description": "Order level billing information", + "$id": "https://godaddy.com/schemas/commerce/orders/billing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Billing", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the billing info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the billing info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the billing info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the billing info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the billing info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with billing", + "format": "email", + "example": "test-billing@gmail.com" + } + } + }, + "shipping": { + "description": "Order level shipping information", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "lineItems": { + "type": "array", + "description": "Line items for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/line-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "required": [ + "type", + "name", + "fulfillmentMode", + "status", + "totals", + "unitAmount", + "quantity" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the line item (LineItem_). Auto-generated by the service on creation", + "readOnly": true, + "example": "LineItem_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for this line item", + "example": "CI-C8ACE3DB52D7" + }, + "type": { + "description": "Possible types for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item Type", + "type": "string", + "enum": [ + "PHYSICAL", + "DIGITAL", + "ALL", + "SERVICE", + "STAY", + "PAY_LINK" + ] + }, + "name": { + "type": "string", + "description": "Name of the line item used for display purposes to the merchant and customer" + }, + "status": { + "description": "Possible fulfillment statuses for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + }, + "fulfillmentMode": { + "description": "Possible fulfillment modes for a line item", + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + }, + "fulfillmentChannelId": { + "type": "string", + "description": "ID of the fulfillment channel for the line item" + }, + "totals": { + "type": "object", + "description": "Grouped totals for a line item", + "required": [ + "discountTotal", + "feeTotal", + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "lineItem.quantity * lineItem.unitAmount + addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all lineItem.discounts[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Sum of all lineItem.fees[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all lineItem.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "lineItem.quantity * (Sum of all lineItem.details.selectedAddons[].values[].costAdjustment)", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "subTotal + feeTotal + taxTotal + addonsTotal - discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped return totals for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "LineItemReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "unitAmount": { + "description": "The base price of the line item including add-ons, but excluding taxes, fees, discounts. Deprecated and will become read-only in the future.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "quantity": { + "type": "number", + "description": "Quantity purchased by the customer. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "returnQuantity": { + "type": "number", + "description": "Sum of all return quantities for the line item", + "format": "float", + "readOnly": true + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the V1 Catalog service" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the V2 Catalog service" + }, + "skuGroupId": { + "type": "string", + "description": "Reference to a SKU Group entity as defined by the V2 Catalog service." + }, + "details": { + "type": "object", + "description": "All detailed information for a line item - sku, selectedOptions, assetUrl, etc.", + "properties": { + "sku": { + "type": "string", + "description": "SKU of the product. SKU is not required because some consumers do not make SKU a required field when adding a product" + }, + "productAssetUrl": { + "type": "string", + "description": "Product's associated asset URL. This can be an image thumbnail, video URL, etc." + }, + "unitOfMeasure": { + "type": "string", + "description": "Product's unit of measure. Helps denote what was sold. If the line item purchased was grapes, the unit of measure could be set to `LBS`" + }, + "selectedAddons": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected add-ons", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the add-on", + "example": "Pizza Toppings" + }, + "sku": { + "type": "string", + "description": "SKU of the add-on. Certain systems set a SKU per add-on type" + }, + "values": { + "type": "array", + "items": { + "type": "object", + "description": "An add-on can have multiple values. For example a pizza with a Toppings add-on: `Mushrooms: +$0.00`, `Spinach: +$0.00`, and `Sausage: +$1.00`", + "required": [ + "name", + "costAdjustment" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the add-on value", + "example": "Sausage: +$1.00" + }, + "amount": { + "description": "Money object with the amount increase/decrease associated with the add-on value", + "deprecated": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "amountIncreased": { + "type": "boolean", + "description": "Determines whether the add-on amount increases or decreases the price of the line item", + "default": true, + "deprecated": true + }, + "costAdjustment": { + "description": "Cost increase/decrease associated with the add-on value. The value can be negative, unlike other amount fields across the Order schema", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + } + } + } + } + }, + "selectedOptions": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected options", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the option type", + "example": "Size" + }, + "values": { + "type": "array", + "description": "Array of option values with string values", + "items": { + "type": "string", + "example": "Red" + } + } + } + } + } + } + }, + "shipping": { + "description": "Shipping info associated to the line item. If not present, we assume the line item's shipping info is identical to the order's main shipping info", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this line item", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of a line item that does not change", + "example": "FREE_SHIPPING" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Single note field for backwards compatibility - use notes array for new implementations", + "deprecated": true + }, + "serviceStartAt": { + "description": "Datetime used to mark the start of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "serviceEndsAt": { + "description": "Datetime used to mark the end of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "discounts": { + "type": "array", + "description": "Discounts for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfilledAt": { + "description": "The datetime when the line item was fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "returnedAt": { + "description": "The datetime when the line item was returned", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the line item was refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the line item was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the line item was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order schema" + }, + "metafields": { + "type": "array", + "description": "Custom metadata fields for the line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfillmentModes": { + "type": "array", + "description": "Fulfillment modes used across line items for the order", + "readOnly": true, + "items": { + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "description": "Possible fulfillment modes for a line item", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + } + }, + "shippingLines": { + "type": "array", + "description": "Shipping lines for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/shipping-line.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Line", + "type": "object", + "description": "A shipping line details a shipping method used for an order", + "required": [ + "name", + "amount", + "totals" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipping line (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALICx6zxHI32ryuEYDInf8Ck" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "name": { + "type": "string", + "description": "The name of the shipping line for display purposes" + }, + "amount": { + "description": "Shipping cost before taxes", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "totals": { + "type": "object", + "description": "Grouped totals for a shipping line", + "required": [ + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "Subtotal (excluding taxes) for a shipping line. Currently the same as amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all shippingLine.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Total discounts applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Total fees applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Total amount for the shipping line including all taxes, discounts, and fees.\nFormula: totals.subTotal + totals.taxTotal - totals.discountTotal + totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "requestedProvider": { + "type": "string", + "description": "Shipping provider requested by buyer (`UPS`, `USPS`, etc.)" + }, + "requestedService": { + "type": "string", + "description": "Shipping service requested by buyer (`2nd Day`, `Priority`, `Express` etc.)" + }, + "taxes": { + "type": "array", + "description": "Taxes for a shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a shipping line", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/order-tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Tax", + "type": "object", + "description": "A Order tax is applied at the broad order level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "additional": { + "type": "boolean", + "description": "Determines if the tax object is an additional tax (true) or an aggregate (false) of line item taxes. Useful for display and charge purposes", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "links": { + "type": "array", + "readOnly": true, + "description": "List of links associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to the order", + "required": [ + "eventName", + "eventData", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "ORDER.CREATED" + }, + "eventData": { + "type": "string", + "description": "Data associated with this event", + "format": "json" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "transactionIds": { + "type": "array", + "description": "List of transactions as defined by the Transaction Service associated with the order", + "items": { + "type": "string", + "description": "Transaction ID" + } + }, + "staffUserIds": { + "type": "array", + "description": "Staff users associated with the order", + "maxItems": 5, + "items": { + "type": "string", + "description": "Staff user identifier" + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this order", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of an order that does not change", + "example": "has_digital_goods" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Deprecated note field - use notes array instead", + "deprecated": true + }, + "inventoryAction": { + "type": "string", + "description": "The action to take on inventory when the order is placed. Defaults to `AUTO_ADJUST`.", + "$id": "https://godaddy.com/schemas/commerce/orders/inventory-action.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Inventory Action" + }, + "processedAt": { + "description": "The datetime when the order was processed/placed. If you're importing orders from an app or another platform, then you can set `processedAt` to a datetime in the past to match when the original order was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archived": { + "type": "boolean", + "description": "Whether the order is archived", + "deprecated": true, + "default": false + }, + "archivedAt": { + "description": "The datetime when the order was archived", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The datetime when the order was canceled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "completedAt": { + "description": "The datetime when the order was completed", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "paidAt": { + "description": "The datetime when the order was completely paid", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "fulfilledAt": { + "description": "The datetime when the order was completely fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the order was completely refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the order was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the order was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order. Changes whenever the order is updated." + } + } + } + }, + "links": { + "type": "array", + "description": "Array containing one or more HATEOAS link relations that are relevant for traversing orders", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.order:read" + ] + }, + { + "operationId": "findOrder", + "method": "GET", + "path": "/v1/commerce/stores/{storeId}/orders/{orderId}", + "summary": "Find an order", + "description": "Find a single order using the order ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + }, + { + "name": "orderId", + "in": "path", + "required": true, + "description": "The ID of the order", + "schema": { + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + } + } + ], + "responses": { + "200": { + "description": "Successfully found the order", + "schema": { + "type": "object", + "required": [ + "status", + "order" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "order": { + "$id": "https://godaddy.com/schemas/commerce/orders/order.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "definitions": { + "tax": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "required": [ + "context", + "statuses", + "totals", + "lineItems", + "processedAt" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for the order. If provided, it must be a unique identifier at a channel level", + "example": "CI-C8ACE3DB52D7" + }, + "number": { + "type": "string", + "description": "The main number for the order. This is different from the `id` attribute, which is the `ID` of the order used by APIs. Uniqueness is not enforced. This number will show up in Order UIs to the merchant (C1).", + "example": "R409480421" + }, + "numberDisplay": { + "type": "string", + "description": "A human readable number handed out to customers (C2). Uniqueness is not enforced. For example at In-N-Out Burger, they assign an Order a `numberDisplay` from 1 - 100. Once the `numberDisplay` hits 100, the next Order has `numberDisplay` set to 1.", + "example": "110" + }, + "taxExempted": { + "type": "boolean", + "description": "Details whether the order is tax exempt", + "default": false + }, + "context": { + "type": "object", + "description": "Context for an order", + "required": [ + "channelId", + "storeId" + ], + "properties": { + "owner": { + "type": "string", + "description": "Owner creating the order in the order service. This is distinct from a channel. If not provided, the owner will be the Central Order Service", + "example": "urn:com.godaddy:poynt.commerce.order", + "default": "urn:com.godaddy:commerce.order" + }, + "channelId": { + "type": "string", + "description": "ID of the channel that the order belongs to", + "example": "54ee725f-8dee-4b0f-908b-e0334e6628f5" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "businessId": { + "type": "string", + "description": "ID of the business that the order belongs to", + "example": "5d370f50-05f8-4dc3-9b20-80a7552232b2" + }, + "ventureId": { + "type": "string", + "description": "ID of the venture that the order belongs to", + "example": "7226696b-1482-444e-ba03-cd07bbe97d45" + } + } + }, + "statuses": { + "type": "object", + "description": "Current fulfillment status, payment status, and main status for the order", + "required": [ + "status", + "paymentStatus", + "fulfillmentStatus" + ], + "properties": { + "status": { + "description": "Possible statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/order-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Status", + "type": "string", + "enum": [ + "OPEN", + "COMPLETED", + "CANCELED", + "DRAFT" + ] + }, + "paymentStatus": { + "description": "Possible payment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/payment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Status", + "type": "string", + "enum": [ + "NONE", + "PROCESSING", + "PARTIALLY_PAID", + "PAID", + "PARTIALLY_REFUNDED", + "REFUNDED", + "CANCELED", + "PENDING", + "EXTERNALLY_PROCESSED", + "FAILED" + ] + }, + "fulfillmentStatus": { + "description": "Possible fulfillment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + } + } + }, + "totals": { + "description": "Grouped totals for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/total.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Total", + "type": "object", + "required": [ + "subTotal", + "shippingTotal", + "discountTotal", + "feeTotal", + "taxTotal", + "total" + ], + "properties": { + "subTotal": { + "description": "Money object with the sum of item subtotals for an order.\nFormula: Sum of all lineItems[].totals.subTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping totals for an order.\nFormula: Sum of all shippingLines[].totals.total\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal + Sum of all shippingLines[].totals.discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "productDiscountTotal": { + "description": "Money object with the sum of all product discounts for an order.\nFormula: Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingDiscountTotal": { + "description": "Money object with the sum of all shipping discounts for an order.\nFormula: Sum of all shippingLines[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fees for an order.\nFormula: Sum of all fees[].amount + Sum of all lineItems[].totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all taxes.filter(f => f.additional === true)[].amount + Sum of all lineItems[].totals.taxTotal + Sum of all shippingLines[].totals.taxTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Sum of all lineItems[].totals.addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all item, shipping, discount, fee, and tax totals.\nFormula: subTotal + shippingTotal + feeTotal + taxTotal - discountTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped totals for returns associated with an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/order-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "OrderReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "customerId": { + "type": "string", + "description": "Reference to a Customer as defined by the Connections service" + }, + "cartId": { + "type": "string", + "description": "ID associated with a cart. Used to link orders and carts for Inventory tracking purposes" + }, + "billing": { + "description": "Order level billing information", + "$id": "https://godaddy.com/schemas/commerce/orders/billing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Billing", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the billing info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the billing info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the billing info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the billing info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the billing info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with billing", + "format": "email", + "example": "test-billing@gmail.com" + } + } + }, + "shipping": { + "description": "Order level shipping information", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "lineItems": { + "type": "array", + "description": "Line items for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/line-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "required": [ + "type", + "name", + "fulfillmentMode", + "status", + "totals", + "unitAmount", + "quantity" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the line item (LineItem_). Auto-generated by the service on creation", + "readOnly": true, + "example": "LineItem_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for this line item", + "example": "CI-C8ACE3DB52D7" + }, + "type": { + "description": "Possible types for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item Type", + "type": "string", + "enum": [ + "PHYSICAL", + "DIGITAL", + "ALL", + "SERVICE", + "STAY", + "PAY_LINK" + ] + }, + "name": { + "type": "string", + "description": "Name of the line item used for display purposes to the merchant and customer" + }, + "status": { + "description": "Possible fulfillment statuses for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + }, + "fulfillmentMode": { + "description": "Possible fulfillment modes for a line item", + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + }, + "fulfillmentChannelId": { + "type": "string", + "description": "ID of the fulfillment channel for the line item" + }, + "totals": { + "type": "object", + "description": "Grouped totals for a line item", + "required": [ + "discountTotal", + "feeTotal", + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "lineItem.quantity * lineItem.unitAmount + addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all lineItem.discounts[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Sum of all lineItem.fees[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all lineItem.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "lineItem.quantity * (Sum of all lineItem.details.selectedAddons[].values[].costAdjustment)", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "subTotal + feeTotal + taxTotal + addonsTotal - discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped return totals for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "LineItemReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "unitAmount": { + "description": "The base price of the line item including add-ons, but excluding taxes, fees, discounts. Deprecated and will become read-only in the future.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "quantity": { + "type": "number", + "description": "Quantity purchased by the customer. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "returnQuantity": { + "type": "number", + "description": "Sum of all return quantities for the line item", + "format": "float", + "readOnly": true + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the V1 Catalog service" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the V2 Catalog service" + }, + "skuGroupId": { + "type": "string", + "description": "Reference to a SKU Group entity as defined by the V2 Catalog service." + }, + "details": { + "type": "object", + "description": "All detailed information for a line item - sku, selectedOptions, assetUrl, etc.", + "properties": { + "sku": { + "type": "string", + "description": "SKU of the product. SKU is not required because some consumers do not make SKU a required field when adding a product" + }, + "productAssetUrl": { + "type": "string", + "description": "Product's associated asset URL. This can be an image thumbnail, video URL, etc." + }, + "unitOfMeasure": { + "type": "string", + "description": "Product's unit of measure. Helps denote what was sold. If the line item purchased was grapes, the unit of measure could be set to `LBS`" + }, + "selectedAddons": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected add-ons", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the add-on", + "example": "Pizza Toppings" + }, + "sku": { + "type": "string", + "description": "SKU of the add-on. Certain systems set a SKU per add-on type" + }, + "values": { + "type": "array", + "items": { + "type": "object", + "description": "An add-on can have multiple values. For example a pizza with a Toppings add-on: `Mushrooms: +$0.00`, `Spinach: +$0.00`, and `Sausage: +$1.00`", + "required": [ + "name", + "costAdjustment" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the add-on value", + "example": "Sausage: +$1.00" + }, + "amount": { + "description": "Money object with the amount increase/decrease associated with the add-on value", + "deprecated": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "amountIncreased": { + "type": "boolean", + "description": "Determines whether the add-on amount increases or decreases the price of the line item", + "default": true, + "deprecated": true + }, + "costAdjustment": { + "description": "Cost increase/decrease associated with the add-on value. The value can be negative, unlike other amount fields across the Order schema", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + } + } + } + } + }, + "selectedOptions": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected options", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the option type", + "example": "Size" + }, + "values": { + "type": "array", + "description": "Array of option values with string values", + "items": { + "type": "string", + "example": "Red" + } + } + } + } + } + } + }, + "shipping": { + "description": "Shipping info associated to the line item. If not present, we assume the line item's shipping info is identical to the order's main shipping info", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this line item", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of a line item that does not change", + "example": "FREE_SHIPPING" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Single note field for backwards compatibility - use notes array for new implementations", + "deprecated": true + }, + "serviceStartAt": { + "description": "Datetime used to mark the start of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "serviceEndsAt": { + "description": "Datetime used to mark the end of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "discounts": { + "type": "array", + "description": "Discounts for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfilledAt": { + "description": "The datetime when the line item was fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "returnedAt": { + "description": "The datetime when the line item was returned", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the line item was refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the line item was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the line item was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order schema" + }, + "metafields": { + "type": "array", + "description": "Custom metadata fields for the line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfillmentModes": { + "type": "array", + "description": "Fulfillment modes used across line items for the order", + "readOnly": true, + "items": { + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "description": "Possible fulfillment modes for a line item", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + } + }, + "shippingLines": { + "type": "array", + "description": "Shipping lines for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/shipping-line.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Line", + "type": "object", + "description": "A shipping line details a shipping method used for an order", + "required": [ + "name", + "amount", + "totals" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipping line (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALICx6zxHI32ryuEYDInf8Ck" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "name": { + "type": "string", + "description": "The name of the shipping line for display purposes" + }, + "amount": { + "description": "Shipping cost before taxes", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "totals": { + "type": "object", + "description": "Grouped totals for a shipping line", + "required": [ + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "Subtotal (excluding taxes) for a shipping line. Currently the same as amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all shippingLine.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Total discounts applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Total fees applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Total amount for the shipping line including all taxes, discounts, and fees.\nFormula: totals.subTotal + totals.taxTotal - totals.discountTotal + totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "requestedProvider": { + "type": "string", + "description": "Shipping provider requested by buyer (`UPS`, `USPS`, etc.)" + }, + "requestedService": { + "type": "string", + "description": "Shipping service requested by buyer (`2nd Day`, `Priority`, `Express` etc.)" + }, + "taxes": { + "type": "array", + "description": "Taxes for a shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a shipping line", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/order-tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Tax", + "type": "object", + "description": "A Order tax is applied at the broad order level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "additional": { + "type": "boolean", + "description": "Determines if the tax object is an additional tax (true) or an aggregate (false) of line item taxes. Useful for display and charge purposes", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "links": { + "type": "array", + "readOnly": true, + "description": "List of links associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to the order", + "required": [ + "eventName", + "eventData", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "ORDER.CREATED" + }, + "eventData": { + "type": "string", + "description": "Data associated with this event", + "format": "json" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "transactionIds": { + "type": "array", + "description": "List of transactions as defined by the Transaction Service associated with the order", + "items": { + "type": "string", + "description": "Transaction ID" + } + }, + "staffUserIds": { + "type": "array", + "description": "Staff users associated with the order", + "maxItems": 5, + "items": { + "type": "string", + "description": "Staff user identifier" + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this order", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of an order that does not change", + "example": "has_digital_goods" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Deprecated note field - use notes array instead", + "deprecated": true + }, + "inventoryAction": { + "type": "string", + "description": "The action to take on inventory when the order is placed. Defaults to `AUTO_ADJUST`.", + "$id": "https://godaddy.com/schemas/commerce/orders/inventory-action.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Inventory Action" + }, + "processedAt": { + "description": "The datetime when the order was processed/placed. If you're importing orders from an app or another platform, then you can set `processedAt` to a datetime in the past to match when the original order was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archived": { + "type": "boolean", + "description": "Whether the order is archived", + "deprecated": true, + "default": false + }, + "archivedAt": { + "description": "The datetime when the order was archived", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The datetime when the order was canceled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "completedAt": { + "description": "The datetime when the order was completed", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "paidAt": { + "description": "The datetime when the order was completely paid", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "fulfilledAt": { + "description": "The datetime when the order was completely fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the order was completely refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the order was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the order was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order. Changes whenever the order is updated." + } + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.order:read" + ] + }, + { + "operationId": "patchOrder", + "method": "PATCH", + "path": "/v1/commerce/stores/{storeId}/orders/{orderId}", + "summary": "Patch an order", + "description": "Modify an existing order using the store and order ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + }, + { + "name": "orderId", + "in": "path", + "required": true, + "description": "The ID of the order", + "schema": { + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + } + } + ], + "requestBody": { + "required": true, + "description": "The order object to patch", + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/orders/order-patch.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Patch", + "type": "object", + "description": "Consumers can patch most attributes of an Order, but not all. Notable exceptions include `order.statuses.status` and `order.externalId`", + "required": [ + "context" + ], + "properties": { + "number": { + "type": "string", + "description": "The main number for the order. This is different from the `id` attribute, which is the `ID` of the order used by APIs. Uniqueness is not enforced. This number will show up in Order UIs to the merchant (C1).", + "example": "R409480421" + }, + "numberDisplay": { + "type": "string", + "description": "A human readable number handed out to customers (C2). Uniqueness is not enforced. For example at In-N-Out Burger, they assign an Order a `numberDisplay` from 1 - 100. Once the `numberDisplay` hits 100, the next Order has `numberDisplay` set to 1.", + "example": "110" + }, + "taxExempted": { + "type": "boolean", + "description": "Details whether the order is tax exempt", + "default": false + }, + "context": { + "type": "object", + "description": "Context for an order", + "required": [ + "channelId", + "storeId" + ], + "properties": { + "channelId": { + "type": "string", + "description": "ID of the channel that the order belongs to", + "example": "54ee725f-8dee-4b0f-908b-e0334e6628f5" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "businessId": { + "type": "string", + "description": "ID of the business that the order belongs to", + "example": "5d370f50-05f8-4dc3-9b20-80a7552232b2" + }, + "ventureId": { + "type": "string", + "description": "ID of the venture that the order belongs to", + "example": "7226696b-1482-444e-ba03-cd07bbe97d45" + } + } + }, + "statuses": { + "type": "object", + "description": "Current fulfillment status, payment status, and main status for the order", + "required": [ + "paymentStatus", + "fulfillmentStatus" + ], + "properties": { + "paymentStatus": { + "description": "Possible payment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/payment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Status", + "type": "string", + "enum": [ + "NONE", + "PROCESSING", + "PARTIALLY_PAID", + "PAID", + "PARTIALLY_REFUNDED", + "REFUNDED", + "CANCELED", + "PENDING", + "EXTERNALLY_PROCESSED", + "FAILED" + ] + }, + "fulfillmentStatus": { + "description": "Possible fulfillment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + } + } + }, + "totals": { + "description": "Grouped totals for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/total.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Total", + "type": "object", + "required": [ + "subTotal", + "shippingTotal", + "discountTotal", + "feeTotal", + "taxTotal", + "total" + ], + "properties": { + "subTotal": { + "description": "Money object with the sum of item subtotals for an order.\nFormula: Sum of all lineItems[].totals.subTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping totals for an order.\nFormula: Sum of all shippingLines[].totals.total\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal + Sum of all shippingLines[].totals.discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "productDiscountTotal": { + "description": "Money object with the sum of all product discounts for an order.\nFormula: Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingDiscountTotal": { + "description": "Money object with the sum of all shipping discounts for an order.\nFormula: Sum of all shippingLines[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fees for an order.\nFormula: Sum of all fees[].amount + Sum of all lineItems[].totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all taxes.filter(f => f.additional === true)[].amount + Sum of all lineItems[].totals.taxTotal + Sum of all shippingLines[].totals.taxTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Sum of all lineItems[].totals.addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all item, shipping, discount, fee, and tax totals.\nFormula: subTotal + shippingTotal + feeTotal + taxTotal - discountTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "customerId": { + "type": "string", + "description": "Reference to a Customer as defined by the Connections service" + }, + "billing": { + "description": "Order level billing information", + "$id": "https://godaddy.com/schemas/commerce/orders/billing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Billing", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the billing info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the billing info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the billing info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the billing info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the billing info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with billing", + "format": "email", + "example": "test-billing@gmail.com" + } + } + }, + "shipping": { + "description": "Order level shipping information", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "lineItems": { + "type": "array", + "description": "Line items", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/line-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "required": [ + "type", + "name", + "fulfillmentMode", + "status", + "totals", + "unitAmount", + "quantity" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the line item (LineItem_). Auto-generated by the service on creation", + "readOnly": true, + "example": "LineItem_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for this line item", + "example": "CI-C8ACE3DB52D7" + }, + "type": { + "description": "Possible types for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item Type", + "type": "string", + "enum": [ + "PHYSICAL", + "DIGITAL", + "ALL", + "SERVICE", + "STAY", + "PAY_LINK" + ] + }, + "name": { + "type": "string", + "description": "Name of the line item used for display purposes to the merchant and customer" + }, + "status": { + "description": "Possible fulfillment statuses for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + }, + "fulfillmentMode": { + "description": "Possible fulfillment modes for a line item", + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + }, + "fulfillmentChannelId": { + "type": "string", + "description": "ID of the fulfillment channel for the line item" + }, + "totals": { + "type": "object", + "description": "Grouped totals for a line item", + "required": [ + "discountTotal", + "feeTotal", + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "lineItem.quantity * lineItem.unitAmount + addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all lineItem.discounts[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Sum of all lineItem.fees[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all lineItem.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "lineItem.quantity * (Sum of all lineItem.details.selectedAddons[].values[].costAdjustment)", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "subTotal + feeTotal + taxTotal + addonsTotal - discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped return totals for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "LineItemReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "unitAmount": { + "description": "The base price of the line item including add-ons, but excluding taxes, fees, discounts. Deprecated and will become read-only in the future.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "quantity": { + "type": "number", + "description": "Quantity purchased by the customer. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "returnQuantity": { + "type": "number", + "description": "Sum of all return quantities for the line item", + "format": "float", + "readOnly": true + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the V1 Catalog service" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the V2 Catalog service" + }, + "skuGroupId": { + "type": "string", + "description": "Reference to a SKU Group entity as defined by the V2 Catalog service." + }, + "details": { + "type": "object", + "description": "All detailed information for a line item - sku, selectedOptions, assetUrl, etc.", + "properties": { + "sku": { + "type": "string", + "description": "SKU of the product. SKU is not required because some consumers do not make SKU a required field when adding a product" + }, + "productAssetUrl": { + "type": "string", + "description": "Product's associated asset URL. This can be an image thumbnail, video URL, etc." + }, + "unitOfMeasure": { + "type": "string", + "description": "Product's unit of measure. Helps denote what was sold. If the line item purchased was grapes, the unit of measure could be set to `LBS`" + }, + "selectedAddons": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected add-ons", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the add-on", + "example": "Pizza Toppings" + }, + "sku": { + "type": "string", + "description": "SKU of the add-on. Certain systems set a SKU per add-on type" + }, + "values": { + "type": "array", + "items": { + "type": "object", + "description": "An add-on can have multiple values. For example a pizza with a Toppings add-on: `Mushrooms: +$0.00`, `Spinach: +$0.00`, and `Sausage: +$1.00`", + "required": [ + "name", + "costAdjustment" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the add-on value", + "example": "Sausage: +$1.00" + }, + "amount": { + "description": "Money object with the amount increase/decrease associated with the add-on value", + "deprecated": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "amountIncreased": { + "type": "boolean", + "description": "Determines whether the add-on amount increases or decreases the price of the line item", + "default": true, + "deprecated": true + }, + "costAdjustment": { + "description": "Cost increase/decrease associated with the add-on value. The value can be negative, unlike other amount fields across the Order schema", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + } + } + } + } + }, + "selectedOptions": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected options", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the option type", + "example": "Size" + }, + "values": { + "type": "array", + "description": "Array of option values with string values", + "items": { + "type": "string", + "example": "Red" + } + } + } + } + } + } + }, + "shipping": { + "description": "Shipping info associated to the line item. If not present, we assume the line item's shipping info is identical to the order's main shipping info", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this line item", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of a line item that does not change", + "example": "FREE_SHIPPING" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Single note field for backwards compatibility - use notes array for new implementations", + "deprecated": true + }, + "serviceStartAt": { + "description": "Datetime used to mark the start of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "serviceEndsAt": { + "description": "Datetime used to mark the end of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "discounts": { + "type": "array", + "description": "Discounts for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfilledAt": { + "description": "The datetime when the line item was fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "returnedAt": { + "description": "The datetime when the line item was returned", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the line item was refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the line item was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the line item was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order schema" + }, + "metafields": { + "type": "array", + "description": "Custom metadata fields for the line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "shippingLines": { + "type": "array", + "description": "Shipping lines for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/shipping-line.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Line", + "type": "object", + "description": "A shipping line details a shipping method used for an order", + "required": [ + "name", + "amount", + "totals" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipping line (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALICx6zxHI32ryuEYDInf8Ck" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "name": { + "type": "string", + "description": "The name of the shipping line for display purposes" + }, + "amount": { + "description": "Shipping cost before taxes", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "totals": { + "type": "object", + "description": "Grouped totals for a shipping line", + "required": [ + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "Subtotal (excluding taxes) for a shipping line. Currently the same as amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all shippingLine.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Total discounts applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Total fees applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Total amount for the shipping line including all taxes, discounts, and fees.\nFormula: totals.subTotal + totals.taxTotal - totals.discountTotal + totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "requestedProvider": { + "type": "string", + "description": "Shipping provider requested by buyer (`UPS`, `USPS`, etc.)" + }, + "requestedService": { + "type": "string", + "description": "Shipping service requested by buyer (`2nd Day`, `Priority`, `Express` etc.)" + }, + "taxes": { + "type": "array", + "description": "Taxes for a shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a shipping line", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/order-tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Tax", + "type": "object", + "description": "A Order tax is applied at the broad order level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "additional": { + "type": "boolean", + "description": "Determines if the tax object is an additional tax (true) or an aggregate (false) of line item taxes. Useful for display and charge purposes", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "transactionIds": { + "type": "array", + "description": "List of transactions as defined by the Transaction Service associated with the order", + "items": { + "type": "string", + "description": "Transaction ID" + } + }, + "staffUserIds": { + "type": "array", + "description": "Staff users associated with the order", + "maxItems": 5, + "items": { + "type": "string", + "description": "Staff user identifier" + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this order", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of an order that does not change", + "example": "has_digital_goods" + } + }, + "processedAt": { + "description": "The datetime when the order was processed/placed. If you're importing orders from an app or another platform, then you can set `processedAt` to a datetime in the past to match when the original order was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The datetime when the order was canceled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "completedAt": { + "description": "The datetime when the order was completed", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "paidAt": { + "description": "The datetime when the order was completely paid", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "fulfilledAt": { + "description": "The datetime when the order was completely fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the order was completely refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "responses": { + "200": { + "description": "Successfully patched the order", + "schema": { + "type": "object", + "required": [ + "status", + "order" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "order": { + "$id": "https://godaddy.com/schemas/commerce/orders/order.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "definitions": { + "tax": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "required": [ + "context", + "statuses", + "totals", + "lineItems", + "processedAt" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for the order. If provided, it must be a unique identifier at a channel level", + "example": "CI-C8ACE3DB52D7" + }, + "number": { + "type": "string", + "description": "The main number for the order. This is different from the `id` attribute, which is the `ID` of the order used by APIs. Uniqueness is not enforced. This number will show up in Order UIs to the merchant (C1).", + "example": "R409480421" + }, + "numberDisplay": { + "type": "string", + "description": "A human readable number handed out to customers (C2). Uniqueness is not enforced. For example at In-N-Out Burger, they assign an Order a `numberDisplay` from 1 - 100. Once the `numberDisplay` hits 100, the next Order has `numberDisplay` set to 1.", + "example": "110" + }, + "taxExempted": { + "type": "boolean", + "description": "Details whether the order is tax exempt", + "default": false + }, + "context": { + "type": "object", + "description": "Context for an order", + "required": [ + "channelId", + "storeId" + ], + "properties": { + "owner": { + "type": "string", + "description": "Owner creating the order in the order service. This is distinct from a channel. If not provided, the owner will be the Central Order Service", + "example": "urn:com.godaddy:poynt.commerce.order", + "default": "urn:com.godaddy:commerce.order" + }, + "channelId": { + "type": "string", + "description": "ID of the channel that the order belongs to", + "example": "54ee725f-8dee-4b0f-908b-e0334e6628f5" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "businessId": { + "type": "string", + "description": "ID of the business that the order belongs to", + "example": "5d370f50-05f8-4dc3-9b20-80a7552232b2" + }, + "ventureId": { + "type": "string", + "description": "ID of the venture that the order belongs to", + "example": "7226696b-1482-444e-ba03-cd07bbe97d45" + } + } + }, + "statuses": { + "type": "object", + "description": "Current fulfillment status, payment status, and main status for the order", + "required": [ + "status", + "paymentStatus", + "fulfillmentStatus" + ], + "properties": { + "status": { + "description": "Possible statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/order-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Status", + "type": "string", + "enum": [ + "OPEN", + "COMPLETED", + "CANCELED", + "DRAFT" + ] + }, + "paymentStatus": { + "description": "Possible payment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/payment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Status", + "type": "string", + "enum": [ + "NONE", + "PROCESSING", + "PARTIALLY_PAID", + "PAID", + "PARTIALLY_REFUNDED", + "REFUNDED", + "CANCELED", + "PENDING", + "EXTERNALLY_PROCESSED", + "FAILED" + ] + }, + "fulfillmentStatus": { + "description": "Possible fulfillment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + } + } + }, + "totals": { + "description": "Grouped totals for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/total.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Total", + "type": "object", + "required": [ + "subTotal", + "shippingTotal", + "discountTotal", + "feeTotal", + "taxTotal", + "total" + ], + "properties": { + "subTotal": { + "description": "Money object with the sum of item subtotals for an order.\nFormula: Sum of all lineItems[].totals.subTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping totals for an order.\nFormula: Sum of all shippingLines[].totals.total\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal + Sum of all shippingLines[].totals.discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "productDiscountTotal": { + "description": "Money object with the sum of all product discounts for an order.\nFormula: Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingDiscountTotal": { + "description": "Money object with the sum of all shipping discounts for an order.\nFormula: Sum of all shippingLines[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fees for an order.\nFormula: Sum of all fees[].amount + Sum of all lineItems[].totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all taxes.filter(f => f.additional === true)[].amount + Sum of all lineItems[].totals.taxTotal + Sum of all shippingLines[].totals.taxTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Sum of all lineItems[].totals.addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all item, shipping, discount, fee, and tax totals.\nFormula: subTotal + shippingTotal + feeTotal + taxTotal - discountTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped totals for returns associated with an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/order-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "OrderReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "customerId": { + "type": "string", + "description": "Reference to a Customer as defined by the Connections service" + }, + "cartId": { + "type": "string", + "description": "ID associated with a cart. Used to link orders and carts for Inventory tracking purposes" + }, + "billing": { + "description": "Order level billing information", + "$id": "https://godaddy.com/schemas/commerce/orders/billing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Billing", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the billing info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the billing info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the billing info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the billing info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the billing info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with billing", + "format": "email", + "example": "test-billing@gmail.com" + } + } + }, + "shipping": { + "description": "Order level shipping information", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "lineItems": { + "type": "array", + "description": "Line items for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/line-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "required": [ + "type", + "name", + "fulfillmentMode", + "status", + "totals", + "unitAmount", + "quantity" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the line item (LineItem_). Auto-generated by the service on creation", + "readOnly": true, + "example": "LineItem_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for this line item", + "example": "CI-C8ACE3DB52D7" + }, + "type": { + "description": "Possible types for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item Type", + "type": "string", + "enum": [ + "PHYSICAL", + "DIGITAL", + "ALL", + "SERVICE", + "STAY", + "PAY_LINK" + ] + }, + "name": { + "type": "string", + "description": "Name of the line item used for display purposes to the merchant and customer" + }, + "status": { + "description": "Possible fulfillment statuses for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + }, + "fulfillmentMode": { + "description": "Possible fulfillment modes for a line item", + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + }, + "fulfillmentChannelId": { + "type": "string", + "description": "ID of the fulfillment channel for the line item" + }, + "totals": { + "type": "object", + "description": "Grouped totals for a line item", + "required": [ + "discountTotal", + "feeTotal", + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "lineItem.quantity * lineItem.unitAmount + addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all lineItem.discounts[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Sum of all lineItem.fees[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all lineItem.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "lineItem.quantity * (Sum of all lineItem.details.selectedAddons[].values[].costAdjustment)", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "subTotal + feeTotal + taxTotal + addonsTotal - discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped return totals for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "LineItemReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "unitAmount": { + "description": "The base price of the line item including add-ons, but excluding taxes, fees, discounts. Deprecated and will become read-only in the future.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "quantity": { + "type": "number", + "description": "Quantity purchased by the customer. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "returnQuantity": { + "type": "number", + "description": "Sum of all return quantities for the line item", + "format": "float", + "readOnly": true + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the V1 Catalog service" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the V2 Catalog service" + }, + "skuGroupId": { + "type": "string", + "description": "Reference to a SKU Group entity as defined by the V2 Catalog service." + }, + "details": { + "type": "object", + "description": "All detailed information for a line item - sku, selectedOptions, assetUrl, etc.", + "properties": { + "sku": { + "type": "string", + "description": "SKU of the product. SKU is not required because some consumers do not make SKU a required field when adding a product" + }, + "productAssetUrl": { + "type": "string", + "description": "Product's associated asset URL. This can be an image thumbnail, video URL, etc." + }, + "unitOfMeasure": { + "type": "string", + "description": "Product's unit of measure. Helps denote what was sold. If the line item purchased was grapes, the unit of measure could be set to `LBS`" + }, + "selectedAddons": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected add-ons", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the add-on", + "example": "Pizza Toppings" + }, + "sku": { + "type": "string", + "description": "SKU of the add-on. Certain systems set a SKU per add-on type" + }, + "values": { + "type": "array", + "items": { + "type": "object", + "description": "An add-on can have multiple values. For example a pizza with a Toppings add-on: `Mushrooms: +$0.00`, `Spinach: +$0.00`, and `Sausage: +$1.00`", + "required": [ + "name", + "costAdjustment" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the add-on value", + "example": "Sausage: +$1.00" + }, + "amount": { + "description": "Money object with the amount increase/decrease associated with the add-on value", + "deprecated": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "amountIncreased": { + "type": "boolean", + "description": "Determines whether the add-on amount increases or decreases the price of the line item", + "default": true, + "deprecated": true + }, + "costAdjustment": { + "description": "Cost increase/decrease associated with the add-on value. The value can be negative, unlike other amount fields across the Order schema", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + } + } + } + } + }, + "selectedOptions": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected options", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the option type", + "example": "Size" + }, + "values": { + "type": "array", + "description": "Array of option values with string values", + "items": { + "type": "string", + "example": "Red" + } + } + } + } + } + } + }, + "shipping": { + "description": "Shipping info associated to the line item. If not present, we assume the line item's shipping info is identical to the order's main shipping info", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this line item", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of a line item that does not change", + "example": "FREE_SHIPPING" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Single note field for backwards compatibility - use notes array for new implementations", + "deprecated": true + }, + "serviceStartAt": { + "description": "Datetime used to mark the start of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "serviceEndsAt": { + "description": "Datetime used to mark the end of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "discounts": { + "type": "array", + "description": "Discounts for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfilledAt": { + "description": "The datetime when the line item was fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "returnedAt": { + "description": "The datetime when the line item was returned", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the line item was refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the line item was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the line item was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order schema" + }, + "metafields": { + "type": "array", + "description": "Custom metadata fields for the line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfillmentModes": { + "type": "array", + "description": "Fulfillment modes used across line items for the order", + "readOnly": true, + "items": { + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "description": "Possible fulfillment modes for a line item", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + } + }, + "shippingLines": { + "type": "array", + "description": "Shipping lines for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/shipping-line.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Line", + "type": "object", + "description": "A shipping line details a shipping method used for an order", + "required": [ + "name", + "amount", + "totals" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipping line (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALICx6zxHI32ryuEYDInf8Ck" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "name": { + "type": "string", + "description": "The name of the shipping line for display purposes" + }, + "amount": { + "description": "Shipping cost before taxes", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "totals": { + "type": "object", + "description": "Grouped totals for a shipping line", + "required": [ + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "Subtotal (excluding taxes) for a shipping line. Currently the same as amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all shippingLine.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Total discounts applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Total fees applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Total amount for the shipping line including all taxes, discounts, and fees.\nFormula: totals.subTotal + totals.taxTotal - totals.discountTotal + totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "requestedProvider": { + "type": "string", + "description": "Shipping provider requested by buyer (`UPS`, `USPS`, etc.)" + }, + "requestedService": { + "type": "string", + "description": "Shipping service requested by buyer (`2nd Day`, `Priority`, `Express` etc.)" + }, + "taxes": { + "type": "array", + "description": "Taxes for a shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a shipping line", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/order-tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Tax", + "type": "object", + "description": "A Order tax is applied at the broad order level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "additional": { + "type": "boolean", + "description": "Determines if the tax object is an additional tax (true) or an aggregate (false) of line item taxes. Useful for display and charge purposes", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "links": { + "type": "array", + "readOnly": true, + "description": "List of links associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to the order", + "required": [ + "eventName", + "eventData", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "ORDER.CREATED" + }, + "eventData": { + "type": "string", + "description": "Data associated with this event", + "format": "json" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "transactionIds": { + "type": "array", + "description": "List of transactions as defined by the Transaction Service associated with the order", + "items": { + "type": "string", + "description": "Transaction ID" + } + }, + "staffUserIds": { + "type": "array", + "description": "Staff users associated with the order", + "maxItems": 5, + "items": { + "type": "string", + "description": "Staff user identifier" + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this order", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of an order that does not change", + "example": "has_digital_goods" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Deprecated note field - use notes array instead", + "deprecated": true + }, + "inventoryAction": { + "type": "string", + "description": "The action to take on inventory when the order is placed. Defaults to `AUTO_ADJUST`.", + "$id": "https://godaddy.com/schemas/commerce/orders/inventory-action.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Inventory Action" + }, + "processedAt": { + "description": "The datetime when the order was processed/placed. If you're importing orders from an app or another platform, then you can set `processedAt` to a datetime in the past to match when the original order was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archived": { + "type": "boolean", + "description": "Whether the order is archived", + "deprecated": true, + "default": false + }, + "archivedAt": { + "description": "The datetime when the order was archived", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The datetime when the order was canceled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "completedAt": { + "description": "The datetime when the order was completed", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "paidAt": { + "description": "The datetime when the order was completely paid", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "fulfilledAt": { + "description": "The datetime when the order was completely fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the order was completely refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the order was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the order was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order. Changes whenever the order is updated." + } + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.order:update" + ] + }, + { + "operationId": "queryArchivedOrders", + "method": "GET", + "path": "/v1/commerce/stores/{storeId}/orders/archived", + "summary": "Find archived orders", + "description": "Find any archived orders with pagination using the store ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "A non-negative, non-zero integer indicating the maximum number of resouces to return at one time", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100, + "default": 25 + } + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "description": "Returns the resources that come after this specified cursor", + "schema": { + "type": "string", + "description": "A cursor for use in pagination", + "example": "MTY1MTc0NTczMDAwMDsyRzVWc1dFRmhJa3RIOFBZNHFDMGlPR0RwVko=" + } + }, + { + "name": "pageTokenDirection", + "in": "query", + "required": false, + "description": "Direction indicator used for cursor based pagination", + "schema": { + "type": "string", + "description": "Page token direction", + "enum": [ + "BACKWARD", + "FORWARD" + ], + "default": "FORWARD" + } + } + ], + "responses": { + "200": { + "description": "Successfully listed archived orders", + "schema": { + "type": "object", + "title": "ArchivedOrders", + "required": [ + "status", + "orders", + "links" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "orders": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/order.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "definitions": { + "tax": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "required": [ + "context", + "statuses", + "totals", + "lineItems", + "processedAt" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for the order. If provided, it must be a unique identifier at a channel level", + "example": "CI-C8ACE3DB52D7" + }, + "number": { + "type": "string", + "description": "The main number for the order. This is different from the `id` attribute, which is the `ID` of the order used by APIs. Uniqueness is not enforced. This number will show up in Order UIs to the merchant (C1).", + "example": "R409480421" + }, + "numberDisplay": { + "type": "string", + "description": "A human readable number handed out to customers (C2). Uniqueness is not enforced. For example at In-N-Out Burger, they assign an Order a `numberDisplay` from 1 - 100. Once the `numberDisplay` hits 100, the next Order has `numberDisplay` set to 1.", + "example": "110" + }, + "taxExempted": { + "type": "boolean", + "description": "Details whether the order is tax exempt", + "default": false + }, + "context": { + "type": "object", + "description": "Context for an order", + "required": [ + "channelId", + "storeId" + ], + "properties": { + "owner": { + "type": "string", + "description": "Owner creating the order in the order service. This is distinct from a channel. If not provided, the owner will be the Central Order Service", + "example": "urn:com.godaddy:poynt.commerce.order", + "default": "urn:com.godaddy:commerce.order" + }, + "channelId": { + "type": "string", + "description": "ID of the channel that the order belongs to", + "example": "54ee725f-8dee-4b0f-908b-e0334e6628f5" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "businessId": { + "type": "string", + "description": "ID of the business that the order belongs to", + "example": "5d370f50-05f8-4dc3-9b20-80a7552232b2" + }, + "ventureId": { + "type": "string", + "description": "ID of the venture that the order belongs to", + "example": "7226696b-1482-444e-ba03-cd07bbe97d45" + } + } + }, + "statuses": { + "type": "object", + "description": "Current fulfillment status, payment status, and main status for the order", + "required": [ + "status", + "paymentStatus", + "fulfillmentStatus" + ], + "properties": { + "status": { + "description": "Possible statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/order-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Status", + "type": "string", + "enum": [ + "OPEN", + "COMPLETED", + "CANCELED", + "DRAFT" + ] + }, + "paymentStatus": { + "description": "Possible payment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/payment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Status", + "type": "string", + "enum": [ + "NONE", + "PROCESSING", + "PARTIALLY_PAID", + "PAID", + "PARTIALLY_REFUNDED", + "REFUNDED", + "CANCELED", + "PENDING", + "EXTERNALLY_PROCESSED", + "FAILED" + ] + }, + "fulfillmentStatus": { + "description": "Possible fulfillment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + } + } + }, + "totals": { + "description": "Grouped totals for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/total.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Total", + "type": "object", + "required": [ + "subTotal", + "shippingTotal", + "discountTotal", + "feeTotal", + "taxTotal", + "total" + ], + "properties": { + "subTotal": { + "description": "Money object with the sum of item subtotals for an order.\nFormula: Sum of all lineItems[].totals.subTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping totals for an order.\nFormula: Sum of all shippingLines[].totals.total\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal + Sum of all shippingLines[].totals.discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "productDiscountTotal": { + "description": "Money object with the sum of all product discounts for an order.\nFormula: Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingDiscountTotal": { + "description": "Money object with the sum of all shipping discounts for an order.\nFormula: Sum of all shippingLines[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fees for an order.\nFormula: Sum of all fees[].amount + Sum of all lineItems[].totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all taxes.filter(f => f.additional === true)[].amount + Sum of all lineItems[].totals.taxTotal + Sum of all shippingLines[].totals.taxTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Sum of all lineItems[].totals.addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all item, shipping, discount, fee, and tax totals.\nFormula: subTotal + shippingTotal + feeTotal + taxTotal - discountTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped totals for returns associated with an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/order-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "OrderReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "customerId": { + "type": "string", + "description": "Reference to a Customer as defined by the Connections service" + }, + "cartId": { + "type": "string", + "description": "ID associated with a cart. Used to link orders and carts for Inventory tracking purposes" + }, + "billing": { + "description": "Order level billing information", + "$id": "https://godaddy.com/schemas/commerce/orders/billing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Billing", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the billing info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the billing info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the billing info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the billing info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the billing info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with billing", + "format": "email", + "example": "test-billing@gmail.com" + } + } + }, + "shipping": { + "description": "Order level shipping information", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "lineItems": { + "type": "array", + "description": "Line items for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/line-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "required": [ + "type", + "name", + "fulfillmentMode", + "status", + "totals", + "unitAmount", + "quantity" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the line item (LineItem_). Auto-generated by the service on creation", + "readOnly": true, + "example": "LineItem_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for this line item", + "example": "CI-C8ACE3DB52D7" + }, + "type": { + "description": "Possible types for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item Type", + "type": "string", + "enum": [ + "PHYSICAL", + "DIGITAL", + "ALL", + "SERVICE", + "STAY", + "PAY_LINK" + ] + }, + "name": { + "type": "string", + "description": "Name of the line item used for display purposes to the merchant and customer" + }, + "status": { + "description": "Possible fulfillment statuses for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + }, + "fulfillmentMode": { + "description": "Possible fulfillment modes for a line item", + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + }, + "fulfillmentChannelId": { + "type": "string", + "description": "ID of the fulfillment channel for the line item" + }, + "totals": { + "type": "object", + "description": "Grouped totals for a line item", + "required": [ + "discountTotal", + "feeTotal", + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "lineItem.quantity * lineItem.unitAmount + addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all lineItem.discounts[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Sum of all lineItem.fees[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all lineItem.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "lineItem.quantity * (Sum of all lineItem.details.selectedAddons[].values[].costAdjustment)", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "subTotal + feeTotal + taxTotal + addonsTotal - discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped return totals for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "LineItemReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "unitAmount": { + "description": "The base price of the line item including add-ons, but excluding taxes, fees, discounts. Deprecated and will become read-only in the future.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "quantity": { + "type": "number", + "description": "Quantity purchased by the customer. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "returnQuantity": { + "type": "number", + "description": "Sum of all return quantities for the line item", + "format": "float", + "readOnly": true + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the V1 Catalog service" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the V2 Catalog service" + }, + "skuGroupId": { + "type": "string", + "description": "Reference to a SKU Group entity as defined by the V2 Catalog service." + }, + "details": { + "type": "object", + "description": "All detailed information for a line item - sku, selectedOptions, assetUrl, etc.", + "properties": { + "sku": { + "type": "string", + "description": "SKU of the product. SKU is not required because some consumers do not make SKU a required field when adding a product" + }, + "productAssetUrl": { + "type": "string", + "description": "Product's associated asset URL. This can be an image thumbnail, video URL, etc." + }, + "unitOfMeasure": { + "type": "string", + "description": "Product's unit of measure. Helps denote what was sold. If the line item purchased was grapes, the unit of measure could be set to `LBS`" + }, + "selectedAddons": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected add-ons", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the add-on", + "example": "Pizza Toppings" + }, + "sku": { + "type": "string", + "description": "SKU of the add-on. Certain systems set a SKU per add-on type" + }, + "values": { + "type": "array", + "items": { + "type": "object", + "description": "An add-on can have multiple values. For example a pizza with a Toppings add-on: `Mushrooms: +$0.00`, `Spinach: +$0.00`, and `Sausage: +$1.00`", + "required": [ + "name", + "costAdjustment" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the add-on value", + "example": "Sausage: +$1.00" + }, + "amount": { + "description": "Money object with the amount increase/decrease associated with the add-on value", + "deprecated": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "amountIncreased": { + "type": "boolean", + "description": "Determines whether the add-on amount increases or decreases the price of the line item", + "default": true, + "deprecated": true + }, + "costAdjustment": { + "description": "Cost increase/decrease associated with the add-on value. The value can be negative, unlike other amount fields across the Order schema", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + } + } + } + } + }, + "selectedOptions": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected options", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the option type", + "example": "Size" + }, + "values": { + "type": "array", + "description": "Array of option values with string values", + "items": { + "type": "string", + "example": "Red" + } + } + } + } + } + } + }, + "shipping": { + "description": "Shipping info associated to the line item. If not present, we assume the line item's shipping info is identical to the order's main shipping info", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this line item", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of a line item that does not change", + "example": "FREE_SHIPPING" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Single note field for backwards compatibility - use notes array for new implementations", + "deprecated": true + }, + "serviceStartAt": { + "description": "Datetime used to mark the start of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "serviceEndsAt": { + "description": "Datetime used to mark the end of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "discounts": { + "type": "array", + "description": "Discounts for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfilledAt": { + "description": "The datetime when the line item was fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "returnedAt": { + "description": "The datetime when the line item was returned", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the line item was refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the line item was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the line item was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order schema" + }, + "metafields": { + "type": "array", + "description": "Custom metadata fields for the line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfillmentModes": { + "type": "array", + "description": "Fulfillment modes used across line items for the order", + "readOnly": true, + "items": { + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "description": "Possible fulfillment modes for a line item", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + } + }, + "shippingLines": { + "type": "array", + "description": "Shipping lines for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/shipping-line.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Line", + "type": "object", + "description": "A shipping line details a shipping method used for an order", + "required": [ + "name", + "amount", + "totals" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipping line (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALICx6zxHI32ryuEYDInf8Ck" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "name": { + "type": "string", + "description": "The name of the shipping line for display purposes" + }, + "amount": { + "description": "Shipping cost before taxes", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "totals": { + "type": "object", + "description": "Grouped totals for a shipping line", + "required": [ + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "Subtotal (excluding taxes) for a shipping line. Currently the same as amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all shippingLine.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Total discounts applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Total fees applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Total amount for the shipping line including all taxes, discounts, and fees.\nFormula: totals.subTotal + totals.taxTotal - totals.discountTotal + totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "requestedProvider": { + "type": "string", + "description": "Shipping provider requested by buyer (`UPS`, `USPS`, etc.)" + }, + "requestedService": { + "type": "string", + "description": "Shipping service requested by buyer (`2nd Day`, `Priority`, `Express` etc.)" + }, + "taxes": { + "type": "array", + "description": "Taxes for a shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a shipping line", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/order-tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Tax", + "type": "object", + "description": "A Order tax is applied at the broad order level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "additional": { + "type": "boolean", + "description": "Determines if the tax object is an additional tax (true) or an aggregate (false) of line item taxes. Useful for display and charge purposes", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "links": { + "type": "array", + "readOnly": true, + "description": "List of links associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to the order", + "required": [ + "eventName", + "eventData", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "ORDER.CREATED" + }, + "eventData": { + "type": "string", + "description": "Data associated with this event", + "format": "json" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "transactionIds": { + "type": "array", + "description": "List of transactions as defined by the Transaction Service associated with the order", + "items": { + "type": "string", + "description": "Transaction ID" + } + }, + "staffUserIds": { + "type": "array", + "description": "Staff users associated with the order", + "maxItems": 5, + "items": { + "type": "string", + "description": "Staff user identifier" + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this order", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of an order that does not change", + "example": "has_digital_goods" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Deprecated note field - use notes array instead", + "deprecated": true + }, + "inventoryAction": { + "type": "string", + "description": "The action to take on inventory when the order is placed. Defaults to `AUTO_ADJUST`.", + "$id": "https://godaddy.com/schemas/commerce/orders/inventory-action.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Inventory Action" + }, + "processedAt": { + "description": "The datetime when the order was processed/placed. If you're importing orders from an app or another platform, then you can set `processedAt` to a datetime in the past to match when the original order was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archived": { + "type": "boolean", + "description": "Whether the order is archived", + "deprecated": true, + "default": false + }, + "archivedAt": { + "description": "The datetime when the order was archived", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The datetime when the order was canceled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "completedAt": { + "description": "The datetime when the order was completed", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "paidAt": { + "description": "The datetime when the order was completely paid", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "fulfilledAt": { + "description": "The datetime when the order was completely fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the order was completely refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the order was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the order was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order. Changes whenever the order is updated." + } + } + } + }, + "links": { + "type": "array", + "description": "Array containing one or more HATEOAS link relations that are relevant for traversing archived orders", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.order:read" + ] + }, + { + "operationId": "archiveOrder", + "method": "POST", + "path": "/v1/commerce/stores/{storeId}/orders/{orderId}/archive", + "summary": "Archive an order", + "description": "Archive an order using the store and order IDs.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + }, + { + "name": "orderId", + "in": "path", + "required": true, + "description": "The ID of the order", + "schema": { + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + } + } + ], + "responses": { + "200": { + "description": "Successfully archived the order", + "schema": { + "type": "object", + "required": [ + "status", + "order" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "order": { + "$id": "https://godaddy.com/schemas/commerce/orders/order.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "definitions": { + "tax": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "required": [ + "context", + "statuses", + "totals", + "lineItems", + "processedAt" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for the order. If provided, it must be a unique identifier at a channel level", + "example": "CI-C8ACE3DB52D7" + }, + "number": { + "type": "string", + "description": "The main number for the order. This is different from the `id` attribute, which is the `ID` of the order used by APIs. Uniqueness is not enforced. This number will show up in Order UIs to the merchant (C1).", + "example": "R409480421" + }, + "numberDisplay": { + "type": "string", + "description": "A human readable number handed out to customers (C2). Uniqueness is not enforced. For example at In-N-Out Burger, they assign an Order a `numberDisplay` from 1 - 100. Once the `numberDisplay` hits 100, the next Order has `numberDisplay` set to 1.", + "example": "110" + }, + "taxExempted": { + "type": "boolean", + "description": "Details whether the order is tax exempt", + "default": false + }, + "context": { + "type": "object", + "description": "Context for an order", + "required": [ + "channelId", + "storeId" + ], + "properties": { + "owner": { + "type": "string", + "description": "Owner creating the order in the order service. This is distinct from a channel. If not provided, the owner will be the Central Order Service", + "example": "urn:com.godaddy:poynt.commerce.order", + "default": "urn:com.godaddy:commerce.order" + }, + "channelId": { + "type": "string", + "description": "ID of the channel that the order belongs to", + "example": "54ee725f-8dee-4b0f-908b-e0334e6628f5" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "businessId": { + "type": "string", + "description": "ID of the business that the order belongs to", + "example": "5d370f50-05f8-4dc3-9b20-80a7552232b2" + }, + "ventureId": { + "type": "string", + "description": "ID of the venture that the order belongs to", + "example": "7226696b-1482-444e-ba03-cd07bbe97d45" + } + } + }, + "statuses": { + "type": "object", + "description": "Current fulfillment status, payment status, and main status for the order", + "required": [ + "status", + "paymentStatus", + "fulfillmentStatus" + ], + "properties": { + "status": { + "description": "Possible statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/order-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Status", + "type": "string", + "enum": [ + "OPEN", + "COMPLETED", + "CANCELED", + "DRAFT" + ] + }, + "paymentStatus": { + "description": "Possible payment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/payment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Status", + "type": "string", + "enum": [ + "NONE", + "PROCESSING", + "PARTIALLY_PAID", + "PAID", + "PARTIALLY_REFUNDED", + "REFUNDED", + "CANCELED", + "PENDING", + "EXTERNALLY_PROCESSED", + "FAILED" + ] + }, + "fulfillmentStatus": { + "description": "Possible fulfillment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + } + } + }, + "totals": { + "description": "Grouped totals for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/total.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Total", + "type": "object", + "required": [ + "subTotal", + "shippingTotal", + "discountTotal", + "feeTotal", + "taxTotal", + "total" + ], + "properties": { + "subTotal": { + "description": "Money object with the sum of item subtotals for an order.\nFormula: Sum of all lineItems[].totals.subTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping totals for an order.\nFormula: Sum of all shippingLines[].totals.total\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal + Sum of all shippingLines[].totals.discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "productDiscountTotal": { + "description": "Money object with the sum of all product discounts for an order.\nFormula: Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingDiscountTotal": { + "description": "Money object with the sum of all shipping discounts for an order.\nFormula: Sum of all shippingLines[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fees for an order.\nFormula: Sum of all fees[].amount + Sum of all lineItems[].totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all taxes.filter(f => f.additional === true)[].amount + Sum of all lineItems[].totals.taxTotal + Sum of all shippingLines[].totals.taxTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Sum of all lineItems[].totals.addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all item, shipping, discount, fee, and tax totals.\nFormula: subTotal + shippingTotal + feeTotal + taxTotal - discountTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped totals for returns associated with an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/order-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "OrderReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "customerId": { + "type": "string", + "description": "Reference to a Customer as defined by the Connections service" + }, + "cartId": { + "type": "string", + "description": "ID associated with a cart. Used to link orders and carts for Inventory tracking purposes" + }, + "billing": { + "description": "Order level billing information", + "$id": "https://godaddy.com/schemas/commerce/orders/billing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Billing", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the billing info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the billing info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the billing info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the billing info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the billing info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with billing", + "format": "email", + "example": "test-billing@gmail.com" + } + } + }, + "shipping": { + "description": "Order level shipping information", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "lineItems": { + "type": "array", + "description": "Line items for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/line-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "required": [ + "type", + "name", + "fulfillmentMode", + "status", + "totals", + "unitAmount", + "quantity" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the line item (LineItem_). Auto-generated by the service on creation", + "readOnly": true, + "example": "LineItem_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for this line item", + "example": "CI-C8ACE3DB52D7" + }, + "type": { + "description": "Possible types for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item Type", + "type": "string", + "enum": [ + "PHYSICAL", + "DIGITAL", + "ALL", + "SERVICE", + "STAY", + "PAY_LINK" + ] + }, + "name": { + "type": "string", + "description": "Name of the line item used for display purposes to the merchant and customer" + }, + "status": { + "description": "Possible fulfillment statuses for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + }, + "fulfillmentMode": { + "description": "Possible fulfillment modes for a line item", + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + }, + "fulfillmentChannelId": { + "type": "string", + "description": "ID of the fulfillment channel for the line item" + }, + "totals": { + "type": "object", + "description": "Grouped totals for a line item", + "required": [ + "discountTotal", + "feeTotal", + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "lineItem.quantity * lineItem.unitAmount + addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all lineItem.discounts[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Sum of all lineItem.fees[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all lineItem.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "lineItem.quantity * (Sum of all lineItem.details.selectedAddons[].values[].costAdjustment)", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "subTotal + feeTotal + taxTotal + addonsTotal - discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped return totals for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "LineItemReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "unitAmount": { + "description": "The base price of the line item including add-ons, but excluding taxes, fees, discounts. Deprecated and will become read-only in the future.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "quantity": { + "type": "number", + "description": "Quantity purchased by the customer. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "returnQuantity": { + "type": "number", + "description": "Sum of all return quantities for the line item", + "format": "float", + "readOnly": true + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the V1 Catalog service" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the V2 Catalog service" + }, + "skuGroupId": { + "type": "string", + "description": "Reference to a SKU Group entity as defined by the V2 Catalog service." + }, + "details": { + "type": "object", + "description": "All detailed information for a line item - sku, selectedOptions, assetUrl, etc.", + "properties": { + "sku": { + "type": "string", + "description": "SKU of the product. SKU is not required because some consumers do not make SKU a required field when adding a product" + }, + "productAssetUrl": { + "type": "string", + "description": "Product's associated asset URL. This can be an image thumbnail, video URL, etc." + }, + "unitOfMeasure": { + "type": "string", + "description": "Product's unit of measure. Helps denote what was sold. If the line item purchased was grapes, the unit of measure could be set to `LBS`" + }, + "selectedAddons": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected add-ons", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the add-on", + "example": "Pizza Toppings" + }, + "sku": { + "type": "string", + "description": "SKU of the add-on. Certain systems set a SKU per add-on type" + }, + "values": { + "type": "array", + "items": { + "type": "object", + "description": "An add-on can have multiple values. For example a pizza with a Toppings add-on: `Mushrooms: +$0.00`, `Spinach: +$0.00`, and `Sausage: +$1.00`", + "required": [ + "name", + "costAdjustment" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the add-on value", + "example": "Sausage: +$1.00" + }, + "amount": { + "description": "Money object with the amount increase/decrease associated with the add-on value", + "deprecated": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "amountIncreased": { + "type": "boolean", + "description": "Determines whether the add-on amount increases or decreases the price of the line item", + "default": true, + "deprecated": true + }, + "costAdjustment": { + "description": "Cost increase/decrease associated with the add-on value. The value can be negative, unlike other amount fields across the Order schema", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + } + } + } + } + }, + "selectedOptions": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected options", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the option type", + "example": "Size" + }, + "values": { + "type": "array", + "description": "Array of option values with string values", + "items": { + "type": "string", + "example": "Red" + } + } + } + } + } + } + }, + "shipping": { + "description": "Shipping info associated to the line item. If not present, we assume the line item's shipping info is identical to the order's main shipping info", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this line item", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of a line item that does not change", + "example": "FREE_SHIPPING" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Single note field for backwards compatibility - use notes array for new implementations", + "deprecated": true + }, + "serviceStartAt": { + "description": "Datetime used to mark the start of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "serviceEndsAt": { + "description": "Datetime used to mark the end of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "discounts": { + "type": "array", + "description": "Discounts for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfilledAt": { + "description": "The datetime when the line item was fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "returnedAt": { + "description": "The datetime when the line item was returned", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the line item was refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the line item was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the line item was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order schema" + }, + "metafields": { + "type": "array", + "description": "Custom metadata fields for the line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfillmentModes": { + "type": "array", + "description": "Fulfillment modes used across line items for the order", + "readOnly": true, + "items": { + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "description": "Possible fulfillment modes for a line item", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + } + }, + "shippingLines": { + "type": "array", + "description": "Shipping lines for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/shipping-line.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Line", + "type": "object", + "description": "A shipping line details a shipping method used for an order", + "required": [ + "name", + "amount", + "totals" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipping line (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALICx6zxHI32ryuEYDInf8Ck" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "name": { + "type": "string", + "description": "The name of the shipping line for display purposes" + }, + "amount": { + "description": "Shipping cost before taxes", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "totals": { + "type": "object", + "description": "Grouped totals for a shipping line", + "required": [ + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "Subtotal (excluding taxes) for a shipping line. Currently the same as amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all shippingLine.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Total discounts applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Total fees applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Total amount for the shipping line including all taxes, discounts, and fees.\nFormula: totals.subTotal + totals.taxTotal - totals.discountTotal + totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "requestedProvider": { + "type": "string", + "description": "Shipping provider requested by buyer (`UPS`, `USPS`, etc.)" + }, + "requestedService": { + "type": "string", + "description": "Shipping service requested by buyer (`2nd Day`, `Priority`, `Express` etc.)" + }, + "taxes": { + "type": "array", + "description": "Taxes for a shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a shipping line", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/order-tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Tax", + "type": "object", + "description": "A Order tax is applied at the broad order level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "additional": { + "type": "boolean", + "description": "Determines if the tax object is an additional tax (true) or an aggregate (false) of line item taxes. Useful for display and charge purposes", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "links": { + "type": "array", + "readOnly": true, + "description": "List of links associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to the order", + "required": [ + "eventName", + "eventData", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "ORDER.CREATED" + }, + "eventData": { + "type": "string", + "description": "Data associated with this event", + "format": "json" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "transactionIds": { + "type": "array", + "description": "List of transactions as defined by the Transaction Service associated with the order", + "items": { + "type": "string", + "description": "Transaction ID" + } + }, + "staffUserIds": { + "type": "array", + "description": "Staff users associated with the order", + "maxItems": 5, + "items": { + "type": "string", + "description": "Staff user identifier" + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this order", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of an order that does not change", + "example": "has_digital_goods" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Deprecated note field - use notes array instead", + "deprecated": true + }, + "inventoryAction": { + "type": "string", + "description": "The action to take on inventory when the order is placed. Defaults to `AUTO_ADJUST`.", + "$id": "https://godaddy.com/schemas/commerce/orders/inventory-action.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Inventory Action" + }, + "processedAt": { + "description": "The datetime when the order was processed/placed. If you're importing orders from an app or another platform, then you can set `processedAt` to a datetime in the past to match when the original order was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archived": { + "type": "boolean", + "description": "Whether the order is archived", + "deprecated": true, + "default": false + }, + "archivedAt": { + "description": "The datetime when the order was archived", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The datetime when the order was canceled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "completedAt": { + "description": "The datetime when the order was completed", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "paidAt": { + "description": "The datetime when the order was completely paid", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "fulfilledAt": { + "description": "The datetime when the order was completely fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the order was completely refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the order was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the order was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order. Changes whenever the order is updated." + } + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.order:archive" + ] + }, + { + "operationId": "cancelOrder", + "method": "POST", + "path": "/v1/commerce/stores/{storeId}/orders/{orderId}/cancel", + "summary": "Cancel an order", + "description": "Cancel an order using the store and order IDs.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + }, + { + "name": "orderId", + "in": "path", + "required": true, + "description": "The ID of the order", + "schema": { + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + } + } + ], + "responses": { + "200": { + "description": "Successfully canceled the order", + "schema": { + "type": "object", + "required": [ + "status", + "order" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "order": { + "$id": "https://godaddy.com/schemas/commerce/orders/order.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "definitions": { + "tax": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "required": [ + "context", + "statuses", + "totals", + "lineItems", + "processedAt" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for the order. If provided, it must be a unique identifier at a channel level", + "example": "CI-C8ACE3DB52D7" + }, + "number": { + "type": "string", + "description": "The main number for the order. This is different from the `id` attribute, which is the `ID` of the order used by APIs. Uniqueness is not enforced. This number will show up in Order UIs to the merchant (C1).", + "example": "R409480421" + }, + "numberDisplay": { + "type": "string", + "description": "A human readable number handed out to customers (C2). Uniqueness is not enforced. For example at In-N-Out Burger, they assign an Order a `numberDisplay` from 1 - 100. Once the `numberDisplay` hits 100, the next Order has `numberDisplay` set to 1.", + "example": "110" + }, + "taxExempted": { + "type": "boolean", + "description": "Details whether the order is tax exempt", + "default": false + }, + "context": { + "type": "object", + "description": "Context for an order", + "required": [ + "channelId", + "storeId" + ], + "properties": { + "owner": { + "type": "string", + "description": "Owner creating the order in the order service. This is distinct from a channel. If not provided, the owner will be the Central Order Service", + "example": "urn:com.godaddy:poynt.commerce.order", + "default": "urn:com.godaddy:commerce.order" + }, + "channelId": { + "type": "string", + "description": "ID of the channel that the order belongs to", + "example": "54ee725f-8dee-4b0f-908b-e0334e6628f5" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "businessId": { + "type": "string", + "description": "ID of the business that the order belongs to", + "example": "5d370f50-05f8-4dc3-9b20-80a7552232b2" + }, + "ventureId": { + "type": "string", + "description": "ID of the venture that the order belongs to", + "example": "7226696b-1482-444e-ba03-cd07bbe97d45" + } + } + }, + "statuses": { + "type": "object", + "description": "Current fulfillment status, payment status, and main status for the order", + "required": [ + "status", + "paymentStatus", + "fulfillmentStatus" + ], + "properties": { + "status": { + "description": "Possible statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/order-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Status", + "type": "string", + "enum": [ + "OPEN", + "COMPLETED", + "CANCELED", + "DRAFT" + ] + }, + "paymentStatus": { + "description": "Possible payment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/payment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Status", + "type": "string", + "enum": [ + "NONE", + "PROCESSING", + "PARTIALLY_PAID", + "PAID", + "PARTIALLY_REFUNDED", + "REFUNDED", + "CANCELED", + "PENDING", + "EXTERNALLY_PROCESSED", + "FAILED" + ] + }, + "fulfillmentStatus": { + "description": "Possible fulfillment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + } + } + }, + "totals": { + "description": "Grouped totals for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/total.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Total", + "type": "object", + "required": [ + "subTotal", + "shippingTotal", + "discountTotal", + "feeTotal", + "taxTotal", + "total" + ], + "properties": { + "subTotal": { + "description": "Money object with the sum of item subtotals for an order.\nFormula: Sum of all lineItems[].totals.subTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping totals for an order.\nFormula: Sum of all shippingLines[].totals.total\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal + Sum of all shippingLines[].totals.discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "productDiscountTotal": { + "description": "Money object with the sum of all product discounts for an order.\nFormula: Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingDiscountTotal": { + "description": "Money object with the sum of all shipping discounts for an order.\nFormula: Sum of all shippingLines[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fees for an order.\nFormula: Sum of all fees[].amount + Sum of all lineItems[].totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all taxes.filter(f => f.additional === true)[].amount + Sum of all lineItems[].totals.taxTotal + Sum of all shippingLines[].totals.taxTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Sum of all lineItems[].totals.addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all item, shipping, discount, fee, and tax totals.\nFormula: subTotal + shippingTotal + feeTotal + taxTotal - discountTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped totals for returns associated with an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/order-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "OrderReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "customerId": { + "type": "string", + "description": "Reference to a Customer as defined by the Connections service" + }, + "cartId": { + "type": "string", + "description": "ID associated with a cart. Used to link orders and carts for Inventory tracking purposes" + }, + "billing": { + "description": "Order level billing information", + "$id": "https://godaddy.com/schemas/commerce/orders/billing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Billing", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the billing info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the billing info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the billing info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the billing info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the billing info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with billing", + "format": "email", + "example": "test-billing@gmail.com" + } + } + }, + "shipping": { + "description": "Order level shipping information", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "lineItems": { + "type": "array", + "description": "Line items for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/line-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "required": [ + "type", + "name", + "fulfillmentMode", + "status", + "totals", + "unitAmount", + "quantity" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the line item (LineItem_). Auto-generated by the service on creation", + "readOnly": true, + "example": "LineItem_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for this line item", + "example": "CI-C8ACE3DB52D7" + }, + "type": { + "description": "Possible types for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item Type", + "type": "string", + "enum": [ + "PHYSICAL", + "DIGITAL", + "ALL", + "SERVICE", + "STAY", + "PAY_LINK" + ] + }, + "name": { + "type": "string", + "description": "Name of the line item used for display purposes to the merchant and customer" + }, + "status": { + "description": "Possible fulfillment statuses for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + }, + "fulfillmentMode": { + "description": "Possible fulfillment modes for a line item", + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + }, + "fulfillmentChannelId": { + "type": "string", + "description": "ID of the fulfillment channel for the line item" + }, + "totals": { + "type": "object", + "description": "Grouped totals for a line item", + "required": [ + "discountTotal", + "feeTotal", + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "lineItem.quantity * lineItem.unitAmount + addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all lineItem.discounts[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Sum of all lineItem.fees[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all lineItem.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "lineItem.quantity * (Sum of all lineItem.details.selectedAddons[].values[].costAdjustment)", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "subTotal + feeTotal + taxTotal + addonsTotal - discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped return totals for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "LineItemReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "unitAmount": { + "description": "The base price of the line item including add-ons, but excluding taxes, fees, discounts. Deprecated and will become read-only in the future.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "quantity": { + "type": "number", + "description": "Quantity purchased by the customer. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "returnQuantity": { + "type": "number", + "description": "Sum of all return quantities for the line item", + "format": "float", + "readOnly": true + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the V1 Catalog service" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the V2 Catalog service" + }, + "skuGroupId": { + "type": "string", + "description": "Reference to a SKU Group entity as defined by the V2 Catalog service." + }, + "details": { + "type": "object", + "description": "All detailed information for a line item - sku, selectedOptions, assetUrl, etc.", + "properties": { + "sku": { + "type": "string", + "description": "SKU of the product. SKU is not required because some consumers do not make SKU a required field when adding a product" + }, + "productAssetUrl": { + "type": "string", + "description": "Product's associated asset URL. This can be an image thumbnail, video URL, etc." + }, + "unitOfMeasure": { + "type": "string", + "description": "Product's unit of measure. Helps denote what was sold. If the line item purchased was grapes, the unit of measure could be set to `LBS`" + }, + "selectedAddons": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected add-ons", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the add-on", + "example": "Pizza Toppings" + }, + "sku": { + "type": "string", + "description": "SKU of the add-on. Certain systems set a SKU per add-on type" + }, + "values": { + "type": "array", + "items": { + "type": "object", + "description": "An add-on can have multiple values. For example a pizza with a Toppings add-on: `Mushrooms: +$0.00`, `Spinach: +$0.00`, and `Sausage: +$1.00`", + "required": [ + "name", + "costAdjustment" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the add-on value", + "example": "Sausage: +$1.00" + }, + "amount": { + "description": "Money object with the amount increase/decrease associated with the add-on value", + "deprecated": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "amountIncreased": { + "type": "boolean", + "description": "Determines whether the add-on amount increases or decreases the price of the line item", + "default": true, + "deprecated": true + }, + "costAdjustment": { + "description": "Cost increase/decrease associated with the add-on value. The value can be negative, unlike other amount fields across the Order schema", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + } + } + } + } + }, + "selectedOptions": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected options", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the option type", + "example": "Size" + }, + "values": { + "type": "array", + "description": "Array of option values with string values", + "items": { + "type": "string", + "example": "Red" + } + } + } + } + } + } + }, + "shipping": { + "description": "Shipping info associated to the line item. If not present, we assume the line item's shipping info is identical to the order's main shipping info", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this line item", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of a line item that does not change", + "example": "FREE_SHIPPING" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Single note field for backwards compatibility - use notes array for new implementations", + "deprecated": true + }, + "serviceStartAt": { + "description": "Datetime used to mark the start of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "serviceEndsAt": { + "description": "Datetime used to mark the end of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "discounts": { + "type": "array", + "description": "Discounts for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfilledAt": { + "description": "The datetime when the line item was fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "returnedAt": { + "description": "The datetime when the line item was returned", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the line item was refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the line item was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the line item was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order schema" + }, + "metafields": { + "type": "array", + "description": "Custom metadata fields for the line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfillmentModes": { + "type": "array", + "description": "Fulfillment modes used across line items for the order", + "readOnly": true, + "items": { + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "description": "Possible fulfillment modes for a line item", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + } + }, + "shippingLines": { + "type": "array", + "description": "Shipping lines for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/shipping-line.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Line", + "type": "object", + "description": "A shipping line details a shipping method used for an order", + "required": [ + "name", + "amount", + "totals" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipping line (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALICx6zxHI32ryuEYDInf8Ck" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "name": { + "type": "string", + "description": "The name of the shipping line for display purposes" + }, + "amount": { + "description": "Shipping cost before taxes", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "totals": { + "type": "object", + "description": "Grouped totals for a shipping line", + "required": [ + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "Subtotal (excluding taxes) for a shipping line. Currently the same as amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all shippingLine.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Total discounts applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Total fees applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Total amount for the shipping line including all taxes, discounts, and fees.\nFormula: totals.subTotal + totals.taxTotal - totals.discountTotal + totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "requestedProvider": { + "type": "string", + "description": "Shipping provider requested by buyer (`UPS`, `USPS`, etc.)" + }, + "requestedService": { + "type": "string", + "description": "Shipping service requested by buyer (`2nd Day`, `Priority`, `Express` etc.)" + }, + "taxes": { + "type": "array", + "description": "Taxes for a shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a shipping line", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/order-tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Tax", + "type": "object", + "description": "A Order tax is applied at the broad order level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "additional": { + "type": "boolean", + "description": "Determines if the tax object is an additional tax (true) or an aggregate (false) of line item taxes. Useful for display and charge purposes", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "links": { + "type": "array", + "readOnly": true, + "description": "List of links associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to the order", + "required": [ + "eventName", + "eventData", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "ORDER.CREATED" + }, + "eventData": { + "type": "string", + "description": "Data associated with this event", + "format": "json" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "transactionIds": { + "type": "array", + "description": "List of transactions as defined by the Transaction Service associated with the order", + "items": { + "type": "string", + "description": "Transaction ID" + } + }, + "staffUserIds": { + "type": "array", + "description": "Staff users associated with the order", + "maxItems": 5, + "items": { + "type": "string", + "description": "Staff user identifier" + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this order", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of an order that does not change", + "example": "has_digital_goods" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Deprecated note field - use notes array instead", + "deprecated": true + }, + "inventoryAction": { + "type": "string", + "description": "The action to take on inventory when the order is placed. Defaults to `AUTO_ADJUST`.", + "$id": "https://godaddy.com/schemas/commerce/orders/inventory-action.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Inventory Action" + }, + "processedAt": { + "description": "The datetime when the order was processed/placed. If you're importing orders from an app or another platform, then you can set `processedAt` to a datetime in the past to match when the original order was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archived": { + "type": "boolean", + "description": "Whether the order is archived", + "deprecated": true, + "default": false + }, + "archivedAt": { + "description": "The datetime when the order was archived", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The datetime when the order was canceled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "completedAt": { + "description": "The datetime when the order was completed", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "paidAt": { + "description": "The datetime when the order was completely paid", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "fulfilledAt": { + "description": "The datetime when the order was completely fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the order was completely refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the order was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the order was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order. Changes whenever the order is updated." + } + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.order:cancel" + ] + }, + { + "operationId": "completeOrder", + "method": "POST", + "path": "/v1/commerce/stores/{storeId}/orders/{orderId}/complete", + "summary": "Complete an order", + "description": "Complete an order using the store and order IDs.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + }, + { + "name": "orderId", + "in": "path", + "required": true, + "description": "The ID of the order", + "schema": { + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + } + } + ], + "responses": { + "200": { + "description": "Successfully completed the order", + "schema": { + "type": "object", + "required": [ + "status", + "order" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "order": { + "$id": "https://godaddy.com/schemas/commerce/orders/order.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "definitions": { + "tax": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "required": [ + "context", + "statuses", + "totals", + "lineItems", + "processedAt" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for the order. If provided, it must be a unique identifier at a channel level", + "example": "CI-C8ACE3DB52D7" + }, + "number": { + "type": "string", + "description": "The main number for the order. This is different from the `id` attribute, which is the `ID` of the order used by APIs. Uniqueness is not enforced. This number will show up in Order UIs to the merchant (C1).", + "example": "R409480421" + }, + "numberDisplay": { + "type": "string", + "description": "A human readable number handed out to customers (C2). Uniqueness is not enforced. For example at In-N-Out Burger, they assign an Order a `numberDisplay` from 1 - 100. Once the `numberDisplay` hits 100, the next Order has `numberDisplay` set to 1.", + "example": "110" + }, + "taxExempted": { + "type": "boolean", + "description": "Details whether the order is tax exempt", + "default": false + }, + "context": { + "type": "object", + "description": "Context for an order", + "required": [ + "channelId", + "storeId" + ], + "properties": { + "owner": { + "type": "string", + "description": "Owner creating the order in the order service. This is distinct from a channel. If not provided, the owner will be the Central Order Service", + "example": "urn:com.godaddy:poynt.commerce.order", + "default": "urn:com.godaddy:commerce.order" + }, + "channelId": { + "type": "string", + "description": "ID of the channel that the order belongs to", + "example": "54ee725f-8dee-4b0f-908b-e0334e6628f5" + }, + "storeId": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + }, + "businessId": { + "type": "string", + "description": "ID of the business that the order belongs to", + "example": "5d370f50-05f8-4dc3-9b20-80a7552232b2" + }, + "ventureId": { + "type": "string", + "description": "ID of the venture that the order belongs to", + "example": "7226696b-1482-444e-ba03-cd07bbe97d45" + } + } + }, + "statuses": { + "type": "object", + "description": "Current fulfillment status, payment status, and main status for the order", + "required": [ + "status", + "paymentStatus", + "fulfillmentStatus" + ], + "properties": { + "status": { + "description": "Possible statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/order-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Status", + "type": "string", + "enum": [ + "OPEN", + "COMPLETED", + "CANCELED", + "DRAFT" + ] + }, + "paymentStatus": { + "description": "Possible payment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/payment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Status", + "type": "string", + "enum": [ + "NONE", + "PROCESSING", + "PARTIALLY_PAID", + "PAID", + "PARTIALLY_REFUNDED", + "REFUNDED", + "CANCELED", + "PENDING", + "EXTERNALLY_PROCESSED", + "FAILED" + ] + }, + "fulfillmentStatus": { + "description": "Possible fulfillment statuses for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + } + } + }, + "totals": { + "description": "Grouped totals for an order", + "$id": "https://godaddy.com/schemas/commerce/orders/total.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Total", + "type": "object", + "required": [ + "subTotal", + "shippingTotal", + "discountTotal", + "feeTotal", + "taxTotal", + "total" + ], + "properties": { + "subTotal": { + "description": "Money object with the sum of item subtotals for an order.\nFormula: Sum of all lineItems[].totals.subTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping totals for an order.\nFormula: Sum of all shippingLines[].totals.total\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal + Sum of all shippingLines[].totals.discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "productDiscountTotal": { + "description": "Money object with the sum of all product discounts for an order.\nFormula: Sum of all discounts[].amount + Sum of all lineItems[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingDiscountTotal": { + "description": "Money object with the sum of all shipping discounts for an order.\nFormula: Sum of all shippingLines[].totals.discountTotal\nAlways non-positive (<=0)\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fees for an order.\nFormula: Sum of all fees[].amount + Sum of all lineItems[].totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all taxes.filter(f => f.additional === true)[].amount + Sum of all lineItems[].totals.taxTotal + Sum of all shippingLines[].totals.taxTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Sum of all lineItems[].totals.addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all item, shipping, discount, fee, and tax totals.\nFormula: subTotal + shippingTotal + feeTotal + taxTotal - discountTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped totals for returns associated with an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/order-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "OrderReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for an order", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "customerId": { + "type": "string", + "description": "Reference to a Customer as defined by the Connections service" + }, + "cartId": { + "type": "string", + "description": "ID associated with a cart. Used to link orders and carts for Inventory tracking purposes" + }, + "billing": { + "description": "Order level billing information", + "$id": "https://godaddy.com/schemas/commerce/orders/billing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Billing", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the billing info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the billing info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the billing info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the billing info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the billing info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with billing", + "format": "email", + "example": "test-billing@gmail.com" + } + } + }, + "shipping": { + "description": "Order level shipping information", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "lineItems": { + "type": "array", + "description": "Line items for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/line-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item", + "type": "object", + "description": "A order has to have at least 1 line item which is a representation of what the customer purchased", + "required": [ + "type", + "name", + "fulfillmentMode", + "status", + "totals", + "unitAmount", + "quantity" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the line item (LineItem_). Auto-generated by the service on creation", + "readOnly": true, + "example": "LineItem_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "externalId": { + "type": "string", + "description": "External identifier for this line item", + "example": "CI-C8ACE3DB52D7" + }, + "type": { + "description": "Possible types for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Line Item Type", + "type": "string", + "enum": [ + "PHYSICAL", + "DIGITAL", + "ALL", + "SERVICE", + "STAY", + "PAY_LINK" + ] + }, + "name": { + "type": "string", + "description": "Name of the line item used for display purposes to the merchant and customer" + }, + "status": { + "description": "Possible fulfillment statuses for a line item", + "$id": "https://godaddy.com/schemas/commerce/orders/fulfillment-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Status", + "type": "string", + "enum": [ + "UNFULFILLED", + "ON_HOLD", + "IN_PROGRESS", + "PARTIALLY_FULFILLED", + "FULFILLED", + "PARTIALLY_RETURNED", + "RETURNED", + "AWAITING", + "CONFIRMED", + "CANCELED" + ] + }, + "fulfillmentMode": { + "description": "Possible fulfillment modes for a line item", + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + }, + "fulfillmentChannelId": { + "type": "string", + "description": "ID of the fulfillment channel for the line item" + }, + "totals": { + "type": "object", + "description": "Grouped totals for a line item", + "required": [ + "discountTotal", + "feeTotal", + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "lineItem.quantity * lineItem.unitAmount + addonsTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Sum of all lineItem.discounts[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Sum of all lineItem.fees[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all lineItem.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "lineItem.quantity * (Sum of all lineItem.details.selectedAddons[].values[].costAdjustment)", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "subTotal + feeTotal + taxTotal + addonsTotal - discountTotal", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "returnTotals": { + "description": "Grouped return totals for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/orders/line-item-return-totals.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "LineItemReturnTotals", + "type": "object", + "properties": { + "subTotal": { + "description": "Money object with the sum of purchase price adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "shippingTotal": { + "description": "Money object with the sum of all shipping adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Money object with the sum of all discount adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Money object with the sum of all fee adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Money object with the sum of all tax adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "addonsTotal": { + "description": "Money object with the sum of all addon adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Money object with the sum of all adjustments for a line item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "unitAmount": { + "description": "The base price of the line item including add-ons, but excluding taxes, fees, discounts. Deprecated and will become read-only in the future.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "quantity": { + "type": "number", + "description": "Quantity purchased by the customer. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float" + }, + "returnQuantity": { + "type": "number", + "description": "Sum of all return quantities for the line item", + "format": "float", + "readOnly": true + }, + "productId": { + "type": "string", + "description": "Reference to a Product as defined by the V1 Catalog service" + }, + "skuId": { + "type": "string", + "description": "Reference to a SKU as defined by the V2 Catalog service" + }, + "skuGroupId": { + "type": "string", + "description": "Reference to a SKU Group entity as defined by the V2 Catalog service." + }, + "details": { + "type": "object", + "description": "All detailed information for a line item - sku, selectedOptions, assetUrl, etc.", + "properties": { + "sku": { + "type": "string", + "description": "SKU of the product. SKU is not required because some consumers do not make SKU a required field when adding a product" + }, + "productAssetUrl": { + "type": "string", + "description": "Product's associated asset URL. This can be an image thumbnail, video URL, etc." + }, + "unitOfMeasure": { + "type": "string", + "description": "Product's unit of measure. Helps denote what was sold. If the line item purchased was grapes, the unit of measure could be set to `LBS`" + }, + "selectedAddons": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected add-ons", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the add-on", + "example": "Pizza Toppings" + }, + "sku": { + "type": "string", + "description": "SKU of the add-on. Certain systems set a SKU per add-on type" + }, + "values": { + "type": "array", + "items": { + "type": "object", + "description": "An add-on can have multiple values. For example a pizza with a Toppings add-on: `Mushrooms: +$0.00`, `Spinach: +$0.00`, and `Sausage: +$1.00`", + "required": [ + "name", + "costAdjustment" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the add-on value", + "example": "Sausage: +$1.00" + }, + "amount": { + "description": "Money object with the amount increase/decrease associated with the add-on value", + "deprecated": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "amountIncreased": { + "type": "boolean", + "description": "Determines whether the add-on amount increases or decreases the price of the line item", + "default": true, + "deprecated": true + }, + "costAdjustment": { + "description": "Cost increase/decrease associated with the add-on value. The value can be negative, unlike other amount fields across the Order schema", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + } + } + } + } + }, + "selectedOptions": { + "type": "array", + "items": { + "type": "object", + "description": "A line item can have multiple selected options", + "required": [ + "attribute", + "values" + ], + "properties": { + "attribute": { + "type": "string", + "description": "Name of the option type", + "example": "Size" + }, + "values": { + "type": "array", + "description": "Array of option values with string values", + "items": { + "type": "string", + "example": "Red" + } + } + } + } + } + } + }, + "shipping": { + "description": "Shipping info associated to the line item. If not present, we assume the line item's shipping info is identical to the order's main shipping info", + "$id": "https://godaddy.com/schemas/commerce/orders/shipping.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping", + "type": "object", + "properties": { + "address": { + "description": "The address associated with the shipping info", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "firstName": { + "type": "string", + "description": "First name associated with the shipping info" + }, + "lastName": { + "type": "string", + "description": "Last name associated with the shipping info" + }, + "companyName": { + "type": "string", + "description": "Company name associated with the shipping info" + }, + "phone": { + "type": "string", + "description": "The phone number associated with the shipping info", + "format": "phone" + }, + "email": { + "type": "string", + "description": "The email address associated with shipping", + "format": "email", + "example": "test@gmail.com" + } + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this line item", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of a line item that does not change", + "example": "FREE_SHIPPING" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Single note field for backwards compatibility - use notes array for new implementations", + "deprecated": true + }, + "serviceStartAt": { + "description": "Datetime used to mark the start of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "serviceEndsAt": { + "description": "Datetime used to mark the end of service for a `STAY` or `SERVICE` line item", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "discounts": { + "type": "array", + "description": "Discounts for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for a line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfilledAt": { + "description": "The datetime when the line item was fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "returnedAt": { + "description": "The datetime when the line item was returned", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the line item was refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the line item was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the line item was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order schema" + }, + "metafields": { + "type": "array", + "description": "Custom metadata fields for the line item", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fulfillmentModes": { + "type": "array", + "description": "Fulfillment modes used across line items for the order", + "readOnly": true, + "items": { + "$id": "https://godaddy.com/schemas/common/fulfillment-mode.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fulfillment Mode", + "type": "string", + "description": "Possible fulfillment modes for a line item", + "enum": [ + "NONE", + "PICKUP", + "SHIP", + "CURBSIDE", + "DELIVERY", + "DRIVE_THRU", + "FOR_HERE", + "TO_GO", + "DIGITAL", + "PURCHASE", + "GENERAL_CONTAINER", + "QUICK_STAY", + "REGULAR_STAY", + "NON_LODGING_NRR", + "NON_LODGING_SALE", + "GIFT_CARD" + ] + } + }, + "shippingLines": { + "type": "array", + "description": "Shipping lines for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/shipping-line.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Line", + "type": "object", + "description": "A shipping line details a shipping method used for an order", + "required": [ + "name", + "amount", + "totals" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipping line (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALICx6zxHI32ryuEYDInf8Ck" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "name": { + "type": "string", + "description": "The name of the shipping line for display purposes" + }, + "amount": { + "description": "Shipping cost before taxes", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "totals": { + "type": "object", + "description": "Grouped totals for a shipping line", + "required": [ + "taxTotal", + "subTotal" + ], + "properties": { + "subTotal": { + "description": "Subtotal (excluding taxes) for a shipping line. Currently the same as amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "taxTotal": { + "description": "Sum of all shippingLine.taxes[].amount", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "discountTotal": { + "description": "Total discounts applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "feeTotal": { + "description": "Total fees applied to the shipping line", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "total": { + "description": "Total amount for the shipping line including all taxes, discounts, and fees.\nFormula: totals.subTotal + totals.taxTotal - totals.discountTotal + totals.feeTotal\n", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + } + } + }, + "requestedProvider": { + "type": "string", + "description": "Shipping provider requested by buyer (`UPS`, `USPS`, etc.)" + }, + "requestedService": { + "type": "string", + "description": "Shipping service requested by buyer (`2nd Day`, `Priority`, `Express` etc.)" + }, + "taxes": { + "type": "array", + "description": "Taxes for a shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Item Tax", + "type": "object", + "description": "An Order Item tax can be applied at the level of an individual line item or shipping line", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a shipping line", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees applied to this shipping line", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + } + } + } + }, + "discounts": { + "type": "array", + "description": "Discounts for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/discount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Discount", + "type": "object", + "description": "A discount can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the discount (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzAIm2h7FSFjGvrG3pOieuVWBg" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the discount", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the discount", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the discount used for display purposes" + }, + "amount": { + "description": "Money object with the discount amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "code": { + "type": "string", + "description": "Code of the applied discount. For orders from certain consumers, the order can have a custom discount applied during checkout that does not have a specific code" + }, + "ratePercentage": { + "description": "Rate of the discount when applied. For example, `5.25` would represent a 5.25% discount coupon. An amount based coupon would not set this attribute", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Discount was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a discount", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "fees": { + "type": "array", + "description": "Fees for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "description": "A miscellaneous fee can be applied at two levels: the broad order level (shipping fee or handling cost) and the individual line item level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the fee (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCP9sWGrPHZs6PHVXWohzdm" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the fee", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the fee", + "example": "a95253f9-c179-4561-9fb1-61edb2c8ccdb", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the fee used for display purposes" + }, + "amount": { + "description": "Money object with the fee amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the fee when applied. For example, `5.25` would represent a 5.25% fee", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "Fee was applied to order / line item before calculating tax", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a fee", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "taxes": { + "type": "array", + "description": "Taxes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/order-tax.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Order Tax", + "type": "object", + "description": "A Order tax is applied at the broad order level", + "required": [ + "name", + "amount" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the tax object (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALD8dzE5gQUiia1qA2gvQJsn" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the tax object", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the tax object", + "example": "141b4db0-d0d6-4792-9251-a35b2bc304c6", + "deprecated": true + }, + "name": { + "type": "string", + "description": "Name of the tax used for display purposes" + }, + "amount": { + "description": "Money object with the tax amount", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "Rate of the tax when applied to the order. For example, `7.25` would represent a 7.25% tax rate", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + }, + "included": { + "type": "boolean", + "description": "Determines whether the tax was included in order / line item / shipping subtotals", + "default": false + }, + "exempted": { + "type": "boolean", + "description": "Determines whether the tax was exempted. Can be used to explicitly explain why a tax has a zero amount", + "default": false + }, + "additional": { + "type": "boolean", + "description": "Determines if the tax object is an additional tax (true) or an aggregate (false) of line item taxes. Useful for display and charge purposes", + "default": false + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a tax", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "notes": { + "type": "array", + "description": "Notes for an order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/note.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Note", + "type": "object", + "description": "A note can be applied at two levels: the broad order level and the individual line item level", + "required": [ + "content" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the note (). Auto-generated by the service on creation", + "readOnly": true, + "example": "2OzALCIyt6zdX7FO0HONJRVjnYE" + }, + "externalIds": { + "type": "array", + "maxItems": 2, + "description": "A set of externalIds associated with the note", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "External ID", + "type": "object", + "description": "An externalId object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the externalId", + "example": "POYNT_ID" + }, + "value": { + "type": "string", + "description": "Value of the externalId", + "example": "5fd460e7-bca8-41d0-a87e-4025fd38406f" + } + } + } + }, + "referenceId": { + "type": "string", + "description": "Reference identifier for the note", + "example": "27bfe2e3-c681-4cd8-8cd6-a44046cee86c", + "deprecated": true + }, + "content": { + "type": "string", + "description": "Order note content", + "example": "Please gift wrap my order :)" + }, + "shouldNotifyCustomer": { + "type": "boolean", + "description": "Consumers of Order Events can key off this attribute to decide if they need to notify customers", + "default": false + }, + "author": { + "type": "string", + "description": "Order note author. This could be a reference to an `employeeId`, etc." + }, + "authorType": { + "type": "string", + "description": "Possible note author types", + "enum": [ + "NONE", + "MERCHANT", + "CUSTOMER" + ], + "default": "NONE" + }, + "deletedAt": { + "description": "The datetime when the note was deleted", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The datetime when the note was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "metafields": { + "type": "array", + "description": "Metafields that allow clients to store source data for a note", + "maxItems": 5, + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafields enable the consumer to attach additional information to a resource, such as an Order or Line Item", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "freeShipping" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"qualityVerified\" : \"true\" }", + "maxLength": 1024 + } + } + } + } + } + } + }, + "links": { + "type": "array", + "readOnly": true, + "description": "List of links associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "history": { + "type": "array", + "readOnly": true, + "description": "List of history events associated to this order", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/history-event.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "History event", + "type": "object", + "description": "Records a event that happened to the order", + "required": [ + "eventName", + "eventData", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "Name of the history event", + "example": "ORDER.CREATED" + }, + "eventData": { + "type": "string", + "description": "Data associated with this event", + "format": "json" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the history event was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "transactionIds": { + "type": "array", + "description": "List of transactions as defined by the Transaction Service associated with the order", + "items": { + "type": "string", + "description": "Transaction ID" + } + }, + "staffUserIds": { + "type": "array", + "description": "Staff users associated with the order", + "maxItems": 5, + "items": { + "type": "string", + "description": "Staff user identifier" + } + }, + "tags": { + "type": "array", + "description": "Tags associated to this order", + "maxItems": 5, + "items": { + "type": "string", + "description": "A tag is an attribute of an order that does not change", + "example": "has_digital_goods" + } + }, + "deprecatedNote": { + "type": "string", + "description": "Deprecated note field - use notes array instead", + "deprecated": true + }, + "inventoryAction": { + "type": "string", + "description": "The action to take on inventory when the order is placed. Defaults to `AUTO_ADJUST`.", + "$id": "https://godaddy.com/schemas/commerce/orders/inventory-action.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Inventory Action" + }, + "processedAt": { + "description": "The datetime when the order was processed/placed. If you're importing orders from an app or another platform, then you can set `processedAt` to a datetime in the past to match when the original order was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "archived": { + "type": "boolean", + "description": "Whether the order is archived", + "deprecated": true, + "default": false + }, + "archivedAt": { + "description": "The datetime when the order was archived", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "canceledAt": { + "description": "The datetime when the order was canceled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "completedAt": { + "description": "The datetime when the order was completed", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "paidAt": { + "description": "The datetime when the order was completely paid", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "fulfilledAt": { + "description": "The datetime when the order was completely fulfilled", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "refundedAt": { + "description": "The datetime when the order was completely refunded", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the order was created in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the order was last updated in our system", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "orderVersion": { + "type": "string", + "description": "Version identifier for the order. Changes whenever the order is updated." + } + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.order:complete" + ] + }, + { + "operationId": "createReturn", + "method": "POST", + "path": "/v1/commerce/stores/{storeId}/returns", + "summary": "Create a return for an order", + "description": "Create a return for an order", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + } + ], + "requestBody": { + "required": true, + "description": "The Return object to create", + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/orders/return.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Return", + "type": "object", + "description": "A return can have either items or adjustments or both", + "required": [ + "orderId", + "status" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the return (Return_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Return_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "orderId": { + "type": "string", + "description": "The order id that the return is associated with (`Order_`)", + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "status": { + "type": "string", + "description": "Order return status: REQUESTED, APPROVED_FOR_RETURN, RECEIVED, PROCESSING, APPROVED, REJECTED, COMPLETED, CANCELED" + }, + "restockTriggerStatus": { + "type": "string", + "description": "The order return status that triggers automatic inventory adjustment" + }, + "items": { + "type": "array", + "description": "The items that are being returned", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnItem", + "type": "object", + "description": "A return item", + "required": [ + "returnId", + "lineItemId", + "quantity", + "reason" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "returnId": { + "type": "string", + "description": "The return id that this item is associated with" + }, + "lineItemId": { + "type": "string", + "description": "The line item id that the return item is associated with" + }, + "quantity": { + "type": "number", + "description": "The quantity of the line item that is being returned. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float", + "exclusiveMinimum": 0 + }, + "restockQuantity": { + "type": "number", + "description": "The quantity of the line item that will be restocked", + "format": "float", + "exclusiveMinimum": 0 + }, + "reason": { + "type": "string", + "description": "WRONG_SIZE, DEFECTIVE_ITEM, NOT_AS_DESCRIBED, BETTER_PRICE_ELSEWHERE, UNWANTED_GIFT, CHANGED_MIND, LATE_DELIVERY, ORDERED_BY_MISTAKE, OTHER" + }, + "otherReason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the return if the reason is `OTHER`" + }, + "totalAdjustments": { + "description": "The total sum of adjustments for the item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "adjustments": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnAdjustment", + "type": "object", + "description": "An adjustment for a return. Can be order level or line item level.", + "required": [ + "amount", + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the adjustment. Auto-generated by the service on creation", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the adjustment (e.g., \"Sales Tax\", \"Discount Code\", \"Shipping\"). Not present for PURCHASE type adjustments." + }, + "referenceId": { + "type": [ + "string", + "null" + ], + "description": "The ID of the fee, discount, tax, etc. that the adjustment is associated with" + }, + "transactionId": { + "type": [ + "string", + "null" + ], + "description": "The transaction id that the adjustment is associated with" + }, + "amount": { + "description": "The amount of the adjustment", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "type": { + "type": "string", + "description": "The type of the adjustment. Examples PURCHASE, FEE, DISCOUNT, TAX, SHIPPING, SHIPPING_TAX" + }, + "createdAt": { + "description": "The date and time the adjustment was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the adjustment was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "locationId": { + "type": "string", + "description": "The location ID where the item should be returned" + }, + "createdAt": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "totalAdjustments": { + "description": "The total sum of adjustments for the return and its items", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "adjustments": { + "type": "array", + "description": "The adjustments for the return", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnAdjustment", + "type": "object", + "description": "An adjustment for a return. Can be order level or line item level.", + "required": [ + "amount", + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the adjustment. Auto-generated by the service on creation", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the adjustment (e.g., \"Sales Tax\", \"Discount Code\", \"Shipping\"). Not present for PURCHASE type adjustments." + }, + "referenceId": { + "type": [ + "string", + "null" + ], + "description": "The ID of the fee, discount, tax, etc. that the adjustment is associated with" + }, + "transactionId": { + "type": [ + "string", + "null" + ], + "description": "The transaction id that the adjustment is associated with" + }, + "amount": { + "description": "The amount of the adjustment", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "type": { + "type": "string", + "description": "The type of the adjustment. Examples PURCHASE, FEE, DISCOUNT, TAX, SHIPPING, SHIPPING_TAX" + }, + "createdAt": { + "description": "The date and time the adjustment was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the adjustment was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "context": { + "type": "object", + "description": "Context for an order return", + "properties": { + "channelId": { + "type": "string", + "description": "ID of the channel where the return was made." + }, + "storeId": { + "type": "string", + "description": "ID of the store the return belongs to.", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + } + }, + "history": { + "type": "array", + "description": "The history of events for the return", + "items": { + "type": "object", + "required": [ + "eventName", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "The name of the event" + }, + "eventData": { + "type": "string", + "description": "Additional data for the event" + }, + "correlationId": { + "type": "string", + "description": "The correlation ID for the event" + }, + "createdAt": { + "description": "The date and time the event was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "createdAt": { + "description": "The date and time the return was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the return was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "responses": { + "200": { + "description": "Successfully created the return", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/orders/return.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Return", + "type": "object", + "description": "A return can have either items or adjustments or both", + "required": [ + "orderId", + "status" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the return (Return_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Return_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "orderId": { + "type": "string", + "description": "The order id that the return is associated with (`Order_`)", + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "status": { + "type": "string", + "description": "Order return status: REQUESTED, APPROVED_FOR_RETURN, RECEIVED, PROCESSING, APPROVED, REJECTED, COMPLETED, CANCELED" + }, + "restockTriggerStatus": { + "type": "string", + "description": "The order return status that triggers automatic inventory adjustment" + }, + "items": { + "type": "array", + "description": "The items that are being returned", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnItem", + "type": "object", + "description": "A return item", + "required": [ + "returnId", + "lineItemId", + "quantity", + "reason" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "returnId": { + "type": "string", + "description": "The return id that this item is associated with" + }, + "lineItemId": { + "type": "string", + "description": "The line item id that the return item is associated with" + }, + "quantity": { + "type": "number", + "description": "The quantity of the line item that is being returned. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float", + "exclusiveMinimum": 0 + }, + "restockQuantity": { + "type": "number", + "description": "The quantity of the line item that will be restocked", + "format": "float", + "exclusiveMinimum": 0 + }, + "reason": { + "type": "string", + "description": "WRONG_SIZE, DEFECTIVE_ITEM, NOT_AS_DESCRIBED, BETTER_PRICE_ELSEWHERE, UNWANTED_GIFT, CHANGED_MIND, LATE_DELIVERY, ORDERED_BY_MISTAKE, OTHER" + }, + "otherReason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the return if the reason is `OTHER`" + }, + "totalAdjustments": { + "description": "The total sum of adjustments for the item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "adjustments": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnAdjustment", + "type": "object", + "description": "An adjustment for a return. Can be order level or line item level.", + "required": [ + "amount", + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the adjustment. Auto-generated by the service on creation", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the adjustment (e.g., \"Sales Tax\", \"Discount Code\", \"Shipping\"). Not present for PURCHASE type adjustments." + }, + "referenceId": { + "type": [ + "string", + "null" + ], + "description": "The ID of the fee, discount, tax, etc. that the adjustment is associated with" + }, + "transactionId": { + "type": [ + "string", + "null" + ], + "description": "The transaction id that the adjustment is associated with" + }, + "amount": { + "description": "The amount of the adjustment", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "type": { + "type": "string", + "description": "The type of the adjustment. Examples PURCHASE, FEE, DISCOUNT, TAX, SHIPPING, SHIPPING_TAX" + }, + "createdAt": { + "description": "The date and time the adjustment was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the adjustment was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "locationId": { + "type": "string", + "description": "The location ID where the item should be returned" + }, + "createdAt": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "totalAdjustments": { + "description": "The total sum of adjustments for the return and its items", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "adjustments": { + "type": "array", + "description": "The adjustments for the return", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnAdjustment", + "type": "object", + "description": "An adjustment for a return. Can be order level or line item level.", + "required": [ + "amount", + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the adjustment. Auto-generated by the service on creation", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the adjustment (e.g., \"Sales Tax\", \"Discount Code\", \"Shipping\"). Not present for PURCHASE type adjustments." + }, + "referenceId": { + "type": [ + "string", + "null" + ], + "description": "The ID of the fee, discount, tax, etc. that the adjustment is associated with" + }, + "transactionId": { + "type": [ + "string", + "null" + ], + "description": "The transaction id that the adjustment is associated with" + }, + "amount": { + "description": "The amount of the adjustment", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "type": { + "type": "string", + "description": "The type of the adjustment. Examples PURCHASE, FEE, DISCOUNT, TAX, SHIPPING, SHIPPING_TAX" + }, + "createdAt": { + "description": "The date and time the adjustment was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the adjustment was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "context": { + "type": "object", + "description": "Context for an order return", + "properties": { + "channelId": { + "type": "string", + "description": "ID of the channel where the return was made." + }, + "storeId": { + "type": "string", + "description": "ID of the store the return belongs to.", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + } + }, + "history": { + "type": "array", + "description": "The history of events for the return", + "items": { + "type": "object", + "required": [ + "eventName", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "The name of the event" + }, + "eventData": { + "type": "string", + "description": "Additional data for the event" + }, + "correlationId": { + "type": "string", + "description": "The correlation ID for the event" + }, + "createdAt": { + "description": "The date and time the event was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "createdAt": { + "description": "The date and time the return was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the return was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.return:create" + ] + }, + { + "operationId": "findReturn", + "method": "GET", + "path": "/v1/commerce/stores/{storeId}/returns/{returnId}", + "summary": "Find a return", + "description": "Find a single return.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + }, + { + "name": "returnId", + "in": "path", + "required": true, + "description": "The ID of the return", + "schema": { + "type": "string", + "format": "uuid", + "description": "UUID of the return" + } + } + ], + "responses": { + "200": { + "description": "Successfully found the return", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/orders/return.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Return", + "type": "object", + "description": "A return can have either items or adjustments or both", + "required": [ + "orderId", + "status" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the return (Return_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Return_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "orderId": { + "type": "string", + "description": "The order id that the return is associated with (`Order_`)", + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "status": { + "type": "string", + "description": "Order return status: REQUESTED, APPROVED_FOR_RETURN, RECEIVED, PROCESSING, APPROVED, REJECTED, COMPLETED, CANCELED" + }, + "restockTriggerStatus": { + "type": "string", + "description": "The order return status that triggers automatic inventory adjustment" + }, + "items": { + "type": "array", + "description": "The items that are being returned", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnItem", + "type": "object", + "description": "A return item", + "required": [ + "returnId", + "lineItemId", + "quantity", + "reason" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "returnId": { + "type": "string", + "description": "The return id that this item is associated with" + }, + "lineItemId": { + "type": "string", + "description": "The line item id that the return item is associated with" + }, + "quantity": { + "type": "number", + "description": "The quantity of the line item that is being returned. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float", + "exclusiveMinimum": 0 + }, + "restockQuantity": { + "type": "number", + "description": "The quantity of the line item that will be restocked", + "format": "float", + "exclusiveMinimum": 0 + }, + "reason": { + "type": "string", + "description": "WRONG_SIZE, DEFECTIVE_ITEM, NOT_AS_DESCRIBED, BETTER_PRICE_ELSEWHERE, UNWANTED_GIFT, CHANGED_MIND, LATE_DELIVERY, ORDERED_BY_MISTAKE, OTHER" + }, + "otherReason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the return if the reason is `OTHER`" + }, + "totalAdjustments": { + "description": "The total sum of adjustments for the item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "adjustments": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnAdjustment", + "type": "object", + "description": "An adjustment for a return. Can be order level or line item level.", + "required": [ + "amount", + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the adjustment. Auto-generated by the service on creation", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the adjustment (e.g., \"Sales Tax\", \"Discount Code\", \"Shipping\"). Not present for PURCHASE type adjustments." + }, + "referenceId": { + "type": [ + "string", + "null" + ], + "description": "The ID of the fee, discount, tax, etc. that the adjustment is associated with" + }, + "transactionId": { + "type": [ + "string", + "null" + ], + "description": "The transaction id that the adjustment is associated with" + }, + "amount": { + "description": "The amount of the adjustment", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "type": { + "type": "string", + "description": "The type of the adjustment. Examples PURCHASE, FEE, DISCOUNT, TAX, SHIPPING, SHIPPING_TAX" + }, + "createdAt": { + "description": "The date and time the adjustment was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the adjustment was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "locationId": { + "type": "string", + "description": "The location ID where the item should be returned" + }, + "createdAt": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "totalAdjustments": { + "description": "The total sum of adjustments for the return and its items", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "adjustments": { + "type": "array", + "description": "The adjustments for the return", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnAdjustment", + "type": "object", + "description": "An adjustment for a return. Can be order level or line item level.", + "required": [ + "amount", + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the adjustment. Auto-generated by the service on creation", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the adjustment (e.g., \"Sales Tax\", \"Discount Code\", \"Shipping\"). Not present for PURCHASE type adjustments." + }, + "referenceId": { + "type": [ + "string", + "null" + ], + "description": "The ID of the fee, discount, tax, etc. that the adjustment is associated with" + }, + "transactionId": { + "type": [ + "string", + "null" + ], + "description": "The transaction id that the adjustment is associated with" + }, + "amount": { + "description": "The amount of the adjustment", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "type": { + "type": "string", + "description": "The type of the adjustment. Examples PURCHASE, FEE, DISCOUNT, TAX, SHIPPING, SHIPPING_TAX" + }, + "createdAt": { + "description": "The date and time the adjustment was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the adjustment was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "context": { + "type": "object", + "description": "Context for an order return", + "properties": { + "channelId": { + "type": "string", + "description": "ID of the channel where the return was made." + }, + "storeId": { + "type": "string", + "description": "ID of the store the return belongs to.", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + } + }, + "history": { + "type": "array", + "description": "The history of events for the return", + "items": { + "type": "object", + "required": [ + "eventName", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "The name of the event" + }, + "eventData": { + "type": "string", + "description": "Additional data for the event" + }, + "correlationId": { + "type": "string", + "description": "The correlation ID for the event" + }, + "createdAt": { + "description": "The date and time the event was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "createdAt": { + "description": "The date and time the return was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the return was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.return:read" + ] + }, + { + "operationId": "patchReturn", + "method": "PATCH", + "path": "/v1/commerce/stores/{storeId}/returns/{returnId}", + "summary": "Modify an existing return", + "description": "Modify an existing return", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + }, + { + "name": "returnId", + "in": "path", + "required": true, + "description": "The ID of the return", + "schema": { + "type": "string", + "format": "uuid", + "description": "UUID of the return" + } + } + ], + "requestBody": { + "required": true, + "description": "The return object to patch", + "contentType": "application/json", + "schema": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/patch.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Patch", + "description": "The JSON patch object to apply partial updates to resources.", + "properties": { + "op": { + "type": "string", + "description": "The operation to complete.", + "enum": [ + "add", + "remove", + "replace", + "move", + "copy", + "test" + ] + }, + "path": { + "type": "string", + "description": "The JSON pointer to the target document location at which to complete the operation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ], + "nullable": true, + "description": "The value to apply. The `remove` operation does not require a value." + }, + "from": { + "type": "string", + "description": "The JSON pointer to the target document location from which to move the value. Required for the `move` operation." + } + }, + "required": [ + "op" + ] + } + } + }, + "responses": { + "200": { + "description": "Successfully patched the return status", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/orders/return.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Return", + "type": "object", + "description": "A return can have either items or adjustments or both", + "required": [ + "orderId", + "status" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the return (Return_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Return_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "orderId": { + "type": "string", + "description": "The order id that the return is associated with (`Order_`)", + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "status": { + "type": "string", + "description": "Order return status: REQUESTED, APPROVED_FOR_RETURN, RECEIVED, PROCESSING, APPROVED, REJECTED, COMPLETED, CANCELED" + }, + "restockTriggerStatus": { + "type": "string", + "description": "The order return status that triggers automatic inventory adjustment" + }, + "items": { + "type": "array", + "description": "The items that are being returned", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnItem", + "type": "object", + "description": "A return item", + "required": [ + "returnId", + "lineItemId", + "quantity", + "reason" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "returnId": { + "type": "string", + "description": "The return id that this item is associated with" + }, + "lineItemId": { + "type": "string", + "description": "The line item id that the return item is associated with" + }, + "quantity": { + "type": "number", + "description": "The quantity of the line item that is being returned. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float", + "exclusiveMinimum": 0 + }, + "restockQuantity": { + "type": "number", + "description": "The quantity of the line item that will be restocked", + "format": "float", + "exclusiveMinimum": 0 + }, + "reason": { + "type": "string", + "description": "WRONG_SIZE, DEFECTIVE_ITEM, NOT_AS_DESCRIBED, BETTER_PRICE_ELSEWHERE, UNWANTED_GIFT, CHANGED_MIND, LATE_DELIVERY, ORDERED_BY_MISTAKE, OTHER" + }, + "otherReason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the return if the reason is `OTHER`" + }, + "totalAdjustments": { + "description": "The total sum of adjustments for the item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "adjustments": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnAdjustment", + "type": "object", + "description": "An adjustment for a return. Can be order level or line item level.", + "required": [ + "amount", + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the adjustment. Auto-generated by the service on creation", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the adjustment (e.g., \"Sales Tax\", \"Discount Code\", \"Shipping\"). Not present for PURCHASE type adjustments." + }, + "referenceId": { + "type": [ + "string", + "null" + ], + "description": "The ID of the fee, discount, tax, etc. that the adjustment is associated with" + }, + "transactionId": { + "type": [ + "string", + "null" + ], + "description": "The transaction id that the adjustment is associated with" + }, + "amount": { + "description": "The amount of the adjustment", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "type": { + "type": "string", + "description": "The type of the adjustment. Examples PURCHASE, FEE, DISCOUNT, TAX, SHIPPING, SHIPPING_TAX" + }, + "createdAt": { + "description": "The date and time the adjustment was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the adjustment was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "locationId": { + "type": "string", + "description": "The location ID where the item should be returned" + }, + "createdAt": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "totalAdjustments": { + "description": "The total sum of adjustments for the return and its items", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "adjustments": { + "type": "array", + "description": "The adjustments for the return", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnAdjustment", + "type": "object", + "description": "An adjustment for a return. Can be order level or line item level.", + "required": [ + "amount", + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the adjustment. Auto-generated by the service on creation", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the adjustment (e.g., \"Sales Tax\", \"Discount Code\", \"Shipping\"). Not present for PURCHASE type adjustments." + }, + "referenceId": { + "type": [ + "string", + "null" + ], + "description": "The ID of the fee, discount, tax, etc. that the adjustment is associated with" + }, + "transactionId": { + "type": [ + "string", + "null" + ], + "description": "The transaction id that the adjustment is associated with" + }, + "amount": { + "description": "The amount of the adjustment", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "type": { + "type": "string", + "description": "The type of the adjustment. Examples PURCHASE, FEE, DISCOUNT, TAX, SHIPPING, SHIPPING_TAX" + }, + "createdAt": { + "description": "The date and time the adjustment was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the adjustment was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "context": { + "type": "object", + "description": "Context for an order return", + "properties": { + "channelId": { + "type": "string", + "description": "ID of the channel where the return was made." + }, + "storeId": { + "type": "string", + "description": "ID of the store the return belongs to.", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + } + }, + "history": { + "type": "array", + "description": "The history of events for the return", + "items": { + "type": "object", + "required": [ + "eventName", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "The name of the event" + }, + "eventData": { + "type": "string", + "description": "Additional data for the event" + }, + "correlationId": { + "type": "string", + "description": "The correlation ID for the event" + }, + "createdAt": { + "description": "The date and time the event was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "createdAt": { + "description": "The date and time the return was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the return was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } } - } - ], - "requestBody": { - "required": true, - "description": "The order object to create", - "contentType": "application/json", - "schema": { - "$ref": "#/components/schemas/Order" - } - }, - "responses": { - "200": { - "description": "Successfully created the order", + }, + "401": { + "description": "Authentication info not sent or is invalid", "schema": { "type": "object", - "title": "OrderCreated", - "required": ["status", "order"], + "required": [ + "code" + ], "properties": { - "status": { + "code": { "type": "string", - "description": "Status of the response", - "example": "success" + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" }, - "order": { - "$ref": "#/components/schemas/Order" + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } } } } }, - "401": { - "description": "See #/components/responses/401" - }, "403": { - "description": "See #/components/responses/403" + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "404": { - "description": "See #/components/responses/404" + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "409": { - "description": "See #/components/responses/409" + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "422": { - "description": "See #/components/responses/422" + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "500": { - "description": "See #/components/responses/500" + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "502": { - "description": "See #/components/responses/502" - }, - "503": { - "description": "See #/components/responses/503" - }, - "504": { - "description": "See #/components/responses/504" - } - }, - "scopes": ["commerce.order:create"] - }, - { - "operationId": "putOrder", - "method": "PUT", - "path": "/v1/commerce/stores/{storeId}/orders", - "summary": "Create order with identifier", - "description": "Create an order with a specified identifier", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "Store ID", + "description": "Bad gateway or failed dependency", "schema": { - "$ref": "./models/Order.yaml#/properties/context/properties/storeId" + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } } - } - ], - "requestBody": { - "required": true, - "description": "The order object to create with a passed in Global ID (e.g. `Order_`)", - "contentType": "application/json", - "schema": { - "$ref": "#/components/schemas/Order" - } - }, - "responses": { - "200": { - "description": "Successfully created the order", + }, + "503": { + "description": "Service is temporarily unavailable", "schema": { "type": "object", - "title": "OrderWithIdCreated", - "required": ["status", "order"], + "required": [ + "code" + ], "properties": { - "status": { + "code": { "type": "string", - "description": "Status of the response", - "example": "success" + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" }, - "order": { - "$ref": "#/components/schemas/Order" + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } } } } }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "409": { - "description": "See #/components/responses/409" - }, - "422": { - "description": "See #/components/responses/422" - }, - "500": { - "description": "See #/components/responses/500" - }, - "502": { - "description": "See #/components/responses/502" - }, - "503": { - "description": "See #/components/responses/503" - }, "504": { - "description": "See #/components/responses/504" + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } } }, - "scopes": ["commerce.order:create"] + "scopes": [ + "commerce.return:update" + ] }, { - "operationId": "queryOrders", - "method": "GET", - "path": "/v1/commerce/stores/{storeId}/orders", - "summary": "Find and filter orders", - "description": "Find orders and filter them using the criteria provided", + "operationId": "deleteReturn", + "method": "DELETE", + "path": "/v1/commerce/stores/{storeId}/returns/{returnId}", + "summary": "Delete a return", + "description": "Delete a single return.", "parameters": [ { "name": "storeId", @@ -166,320 +56714,623 @@ "required": true, "description": "Store ID", "schema": { - "$ref": "./models/Order.yaml#/properties/context/properties/storeId" - } - }, - { - "name": "pageSize", - "in": "query", - "required": false, - "description": "A non-negative, non-zero integer indicating the maximum number of resouces to return at one time", - "schema": { - "type": "integer", - "format": "int64", - "minimum": 1, - "maximum": 100, - "default": 25 - } - }, - { - "name": "pageToken", - "in": "query", - "required": false, - "description": "Returns the resources that come after this specified cursor", - "schema": { - "type": "string", - "description": "A cursor for use in pagination", - "example": "MTY1MTc0NTczMDAwMDsyRzVWc1dFRmhJa3RIOFBZNHFDMGlPR0RwVko=" - } - }, - { - "name": "pageTokenDirection", - "in": "query", - "required": false, - "description": "Direction indicator used for cursor based pagination", - "schema": { - "type": "string", - "description": "Page token direction", - "enum": ["BACKWARD", "FORWARD"], - "default": "FORWARD" - } - }, - { - "name": "processedAtStart", - "in": "query", - "required": false, - "description": "Grab orders with their processedAt => this datetime", - "schema": { - "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", - "type": "string", - "minLength": 20, - "maxLength": 64, - "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" - } - }, - { - "name": "processedAtEnd", - "in": "query", - "required": false, - "description": "Grab orders with their processedAt <= this datetime", - "schema": { - "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", - "type": "string", - "minLength": 20, - "maxLength": 64, - "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" - } - }, - { - "name": "updatedAtStart", - "in": "query", - "required": false, - "description": "Grab orders with their updatedAt => this datetime", - "schema": { - "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", - "type": "string", - "minLength": 20, - "maxLength": 64, - "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" - } - }, - { - "name": "updatedAtEnd", - "in": "query", - "required": false, - "description": "Grab orders with their updatedAt <= this datetime", - "schema": { - "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", "type": "string", - "minLength": 20, - "maxLength": 64, - "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" } }, { - "name": "status", - "in": "query", - "required": false, - "description": "Order status (comma separated)", + "name": "returnId", + "in": "path", + "required": true, + "description": "The ID of the return", "schema": { "type": "string", - "description": "List of order statuses (comma separated)", - "example": "OPEN,COMPLETED" + "format": "uuid", + "description": "UUID of the return" } + } + ], + "responses": { + "204": { + "description": "Successfully deleted the return" }, - { - "name": "paymentStatus", - "in": "query", - "required": false, - "description": "Order payment statuses (comma separated)", + "401": { + "description": "Authentication info not sent or is invalid", "schema": { - "type": "string", - "description": "List of order payment statuses (comma separated)", - "example": "PROCESSING,PAID" + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } } }, - { - "name": "fulfillmentStatus", - "in": "query", - "required": false, - "description": "Order fulfillment statuses (comma separated)", + "403": { + "description": "Authenticated user is not allowed access", "schema": { - "type": "string", - "description": "List of order fulfillment statuses (comma separated)", - "example": "UNFULFILLED,IN_PROGRESS" + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } } }, - { - "name": "fulfillmentMode", - "in": "query", - "required": false, - "description": "Line item fulfillment mode - taken from line items (comma separated)", + "404": { + "description": "Resource not found", "schema": { - "type": "string", - "description": "List of line item fulfillment modes (comma separated)", - "example": "PICKUP,SHIP" + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } } }, - { - "name": "channelId", - "in": "query", - "required": false, - "description": "Channel ID(s) to filter orders by", + "409": { + "description": "Application-specific server state error", "schema": { - "type": "string", - "description": "List of order channelId (comma separated)", - "example": "7a65506f-d706-420b-a5ec-25c5bf69d000,0349f033-a556-49b7-9233-4edd39540112" + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } } }, - { - "name": "name", - "in": "query", - "required": false, - "description": "Shipping / billing name to filter orders by", + "422": { + "description": "Application-specific request error", "schema": { - "type": "string", - "description": "Shipping / billing name", - "example": "Bob Loblaw" + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } } }, - { - "name": "email", - "in": "query", - "required": false, - "description": "Shipping / billing email(s) to filter orders by", + "500": { + "description": "Internal server error", "schema": { - "type": "string", - "description": "Email(s)- comma separated", - "example": "bobloblaw@gmail.com,dirk-nowitzki@gmail.com" + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } } }, - { - "name": "tags", - "in": "query", - "required": false, - "description": "Order tags to filter orders by", + "502": { + "description": "Bad gateway or failed dependency", "schema": { - "type": "string", - "description": "List of tags (comma separated)", - "example": "digital,poynt" + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } } }, - { - "name": "sortBy", - "in": "query", - "required": false, - "description": "Sort the underlying orders by the given key", + "503": { + "description": "Service is temporarily unavailable", "schema": { - "type": "string", - "description": "Key to sort orders by", - "enum": [ - "number", - "processedAt", - "total", - "status", - "fulfillmentStatus", - "paymentStatus", - "updatedAt" + "type": "object", + "required": [ + "code" ], - "default": "processedAt" + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } } }, - { - "name": "sortOrder", - "in": "query", - "required": false, - "description": "Sort direction", - "schema": { - "type": "string", - "description": "Sort direction", - "enum": ["ASC", "DESC"], - "default": "ASC" - } - } - ], - "responses": { - "200": { - "description": "Successfully listed orders", + "504": { + "description": "Gateway or dependency timeout", "schema": { "type": "object", - "title": "Orders", - "required": ["status", "orders", "links"], + "required": [ + "code" + ], "properties": { - "status": { + "code": { "type": "string", - "description": "Status of the response", - "example": "success" + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" }, - "orders": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Order" - } + "message": { + "type": "string", + "description": "Human-readable, English description of the error" }, - "links": { + "fields": { "type": "array", - "description": "Array containing one or more HATEOAS link relations that are relevant for traversing orders", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, "items": { - "title": "Link Description", "type": "object", - "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "required": [ + "path", + "code" + ], "properties": { - "href": { - "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "path": { "type": "string", - "format": "uri" + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" }, - "rel": { - "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", - "type": "string" - }, - "title": { - "description": "The link title.", - "type": "string" - }, - "targetMediaType": { - "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", - "type": "string" - }, - "targetSchema": { - "description": "The schema that describes the link target." - }, - "method": { - "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", - "type": "string" + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" }, - "submissionMediaType": { - "description": "The media type with which to submit data with the request.", + "code": { "type": "string", - "default": "application/json" + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" }, - "submissionSchema": { - "description": "The schema that describes the request data." + "message": { + "type": "string", + "description": "Human-readable, English description of the error" } - }, - "required": ["rel", "href"] + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" } } } } - }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "409": { - "description": "See #/components/responses/409" - }, - "422": { - "description": "See #/components/responses/422" - }, - "500": { - "description": "See #/components/responses/500" - }, - "502": { - "description": "See #/components/responses/502" - }, - "503": { - "description": "See #/components/responses/503" - }, - "504": { - "description": "See #/components/responses/504" } }, - "scopes": ["commerce.order:read"] + "scopes": [ + "commerce.return:delete" + ] }, { - "operationId": "findOrder", + "operationId": "queryOrderReturns", "method": "GET", - "path": "/v1/commerce/stores/{storeId}/orders/{orderId}", - "summary": "Find an order", - "description": "Find a single order using the order ID.", + "path": "/v1/commerce/stores/{storeId}/orders/{orderId}/returns", + "summary": "Find returns for an order", + "description": "Find returns for an order", "parameters": [ { "name": "storeId", @@ -487,7 +57338,9 @@ "required": true, "description": "Store ID", "schema": { - "$ref": "./models/Order.yaml#/properties/context/properties/storeId" + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" } }, { @@ -496,369 +57349,1020 @@ "required": true, "description": "The ID of the order", "schema": { - "$ref": "./models/Order.yaml#/properties/id" + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" } } ], "responses": { "200": { - "description": "Successfully found the order", + "description": "Successfully listed returns", "schema": { - "type": "object", - "required": ["status", "order"], - "properties": { - "status": { - "type": "string", - "description": "Status of the response", - "example": "success" - }, - "order": { - "$ref": "#/components/schemas/Order" + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/return.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Return", + "type": "object", + "description": "A return can have either items or adjustments or both", + "required": [ + "orderId", + "status" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the return (Return_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Return_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "orderId": { + "type": "string", + "description": "The order id that the return is associated with (`Order_`)", + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" + }, + "status": { + "type": "string", + "description": "Order return status: REQUESTED, APPROVED_FOR_RETURN, RECEIVED, PROCESSING, APPROVED, REJECTED, COMPLETED, CANCELED" + }, + "restockTriggerStatus": { + "type": "string", + "description": "The order return status that triggers automatic inventory adjustment" + }, + "items": { + "type": "array", + "description": "The items that are being returned", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-item.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnItem", + "type": "object", + "description": "A return item", + "required": [ + "returnId", + "lineItemId", + "quantity", + "reason" + ], + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "returnId": { + "type": "string", + "description": "The return id that this item is associated with" + }, + "lineItemId": { + "type": "string", + "description": "The line item id that the return item is associated with" + }, + "quantity": { + "type": "number", + "description": "The quantity of the line item that is being returned. Note this could be a float value (e.g. 2.3 Kgs)", + "format": "float", + "exclusiveMinimum": 0 + }, + "restockQuantity": { + "type": "number", + "description": "The quantity of the line item that will be restocked", + "format": "float", + "exclusiveMinimum": 0 + }, + "reason": { + "type": "string", + "description": "WRONG_SIZE, DEFECTIVE_ITEM, NOT_AS_DESCRIBED, BETTER_PRICE_ELSEWHERE, UNWANTED_GIFT, CHANGED_MIND, LATE_DELIVERY, ORDERED_BY_MISTAKE, OTHER" + }, + "otherReason": { + "type": [ + "string", + "null" + ], + "description": "The reason for the return if the reason is `OTHER`" + }, + "totalAdjustments": { + "description": "The total sum of adjustments for the item", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "adjustments": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnAdjustment", + "type": "object", + "description": "An adjustment for a return. Can be order level or line item level.", + "required": [ + "amount", + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the adjustment. Auto-generated by the service on creation", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the adjustment (e.g., \"Sales Tax\", \"Discount Code\", \"Shipping\"). Not present for PURCHASE type adjustments." + }, + "referenceId": { + "type": [ + "string", + "null" + ], + "description": "The ID of the fee, discount, tax, etc. that the adjustment is associated with" + }, + "transactionId": { + "type": [ + "string", + "null" + ], + "description": "The transaction id that the adjustment is associated with" + }, + "amount": { + "description": "The amount of the adjustment", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "type": { + "type": "string", + "description": "The type of the adjustment. Examples PURCHASE, FEE, DISCOUNT, TAX, SHIPPING, SHIPPING_TAX" + }, + "createdAt": { + "description": "The date and time the adjustment was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the adjustment was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "locationId": { + "type": "string", + "description": "The location ID where the item should be returned" + }, + "createdAt": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "totalAdjustments": { + "description": "The total sum of adjustments for the return and its items", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "adjustments": { + "type": "array", + "description": "The adjustments for the return", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnAdjustment", + "type": "object", + "description": "An adjustment for a return. Can be order level or line item level.", + "required": [ + "amount", + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the adjustment. Auto-generated by the service on creation", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the adjustment (e.g., \"Sales Tax\", \"Discount Code\", \"Shipping\"). Not present for PURCHASE type adjustments." + }, + "referenceId": { + "type": [ + "string", + "null" + ], + "description": "The ID of the fee, discount, tax, etc. that the adjustment is associated with" + }, + "transactionId": { + "type": [ + "string", + "null" + ], + "description": "The transaction id that the adjustment is associated with" + }, + "amount": { + "description": "The amount of the adjustment", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "type": { + "type": "string", + "description": "The type of the adjustment. Examples PURCHASE, FEE, DISCOUNT, TAX, SHIPPING, SHIPPING_TAX" + }, + "createdAt": { + "description": "The date and time the adjustment was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the adjustment was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "context": { + "type": "object", + "description": "Context for an order return", + "properties": { + "channelId": { + "type": "string", + "description": "ID of the channel where the return was made." + }, + "storeId": { + "type": "string", + "description": "ID of the store the return belongs to.", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" + } + } + }, + "history": { + "type": "array", + "description": "The history of events for the return", + "items": { + "type": "object", + "required": [ + "eventName", + "createdAt" + ], + "properties": { + "eventName": { + "type": "string", + "description": "The name of the event" + }, + "eventData": { + "type": "string", + "description": "Additional data for the event" + }, + "correlationId": { + "type": "string", + "description": "The correlation ID for the event" + }, + "createdAt": { + "description": "The date and time the event was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "createdAt": { + "description": "The date and time the return was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the return was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } } } } }, "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "409": { - "description": "See #/components/responses/409" - }, - "422": { - "description": "See #/components/responses/422" - }, - "500": { - "description": "See #/components/responses/500" - }, - "502": { - "description": "See #/components/responses/502" - }, - "503": { - "description": "See #/components/responses/503" - }, - "504": { - "description": "See #/components/responses/504" - } - }, - "scopes": ["commerce.order:read"] - }, - { - "operationId": "patchOrder", - "method": "PATCH", - "path": "/v1/commerce/stores/{storeId}/orders/{orderId}", - "summary": "Patch an order", - "description": "Modify an existing order using the store and order ID.", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "Store ID", - "schema": { - "$ref": "./models/Order.yaml#/properties/context/properties/storeId" - } - }, - { - "name": "orderId", - "in": "path", - "required": true, - "description": "The ID of the order", - "schema": { - "$ref": "./models/Order.yaml#/properties/id" - } - } - ], - "requestBody": { - "required": true, - "description": "The order object to patch", - "contentType": "application/json", - "schema": { - "$ref": "./models/OrderPatch.yaml" - } - }, - "responses": { - "200": { - "description": "Successfully patched the order", + "description": "Authentication info not sent or is invalid", "schema": { "type": "object", - "required": ["status", "order"], + "required": [ + "code" + ], "properties": { - "status": { + "code": { "type": "string", - "description": "Status of the response", - "example": "success" + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" }, - "order": { - "$ref": "#/components/schemas/Order" + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } } } } - }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "409": { - "description": "See #/components/responses/409" - }, - "422": { - "description": "See #/components/responses/422" - }, - "500": { - "description": "See #/components/responses/500" - }, - "502": { - "description": "See #/components/responses/502" - }, - "503": { - "description": "See #/components/responses/503" - }, - "504": { - "description": "See #/components/responses/504" - } - }, - "scopes": ["commerce.order:update"] - }, - { - "operationId": "queryArchivedOrders", - "method": "GET", - "path": "/v1/commerce/stores/{storeId}/orders/archived", - "summary": "Find archived orders", - "description": "Find any archived orders with pagination using the store ID.", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "Store ID", - "schema": { - "$ref": "./models/Order.yaml#/properties/context/properties/storeId" - } - }, - { - "name": "pageSize", - "in": "query", - "required": false, - "description": "A non-negative, non-zero integer indicating the maximum number of resouces to return at one time", - "schema": { - "type": "integer", - "format": "int64", - "minimum": 1, - "maximum": 100, - "default": 25 - } - }, - { - "name": "pageToken", - "in": "query", - "required": false, - "description": "Returns the resources that come after this specified cursor", - "schema": { - "type": "string", - "description": "A cursor for use in pagination", - "example": "MTY1MTc0NTczMDAwMDsyRzVWc1dFRmhJa3RIOFBZNHFDMGlPR0RwVko=" - } - }, - { - "name": "pageTokenDirection", - "in": "query", - "required": false, - "description": "Direction indicator used for cursor based pagination", - "schema": { - "type": "string", - "description": "Page token direction", - "enum": ["BACKWARD", "FORWARD"], - "default": "FORWARD" - } - } - ], - "responses": { - "200": { - "description": "Successfully listed archived orders", + }, + "403": { + "description": "Authenticated user is not allowed access", "schema": { "type": "object", - "title": "ArchivedOrders", - "required": ["status", "orders", "links"], + "required": [ + "code" + ], "properties": { - "status": { + "code": { "type": "string", - "description": "Status of the response", - "example": "success" + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" }, - "orders": { + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, "items": { - "$ref": "#/components/schemas/Order" + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } } }, - "links": { + "stack": { "type": "array", - "description": "Array containing one or more HATEOAS link relations that are relevant for traversing archived orders", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, "items": { - "title": "Link Description", "type": "object", - "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "required": [ + "path", + "code" + ], "properties": { - "href": { - "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "path": { "type": "string", - "format": "uri" - }, - "rel": { - "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", - "type": "string" + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" }, - "title": { - "description": "The link title.", - "type": "string" + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" }, - "targetMediaType": { - "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", - "type": "string" + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" }, - "targetSchema": { - "description": "The schema that describes the link target." + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" }, - "method": { - "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", - "type": "string" + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" }, - "submissionMediaType": { - "description": "The media type with which to submit data with the request.", + "code": { "type": "string", - "default": "application/json" + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" }, - "submissionSchema": { - "description": "The schema that describes the request data." + "message": { + "type": "string", + "description": "Human-readable, English description of the error" } - }, - "required": ["rel", "href"] + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" } } } } }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "409": { - "description": "See #/components/responses/409" - }, "422": { - "description": "See #/components/responses/422" + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "500": { - "description": "See #/components/responses/500" + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } }, "502": { - "description": "See #/components/responses/502" - }, - "503": { - "description": "See #/components/responses/503" - }, - "504": { - "description": "See #/components/responses/504" - } - }, - "scopes": ["commerce.order:read"] - }, - { - "operationId": "archiveOrder", - "method": "POST", - "path": "/v1/commerce/stores/{storeId}/orders/{orderId}/archive", - "summary": "Archive an order", - "description": "Archive an order using the store and order IDs.", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "Store ID", + "description": "Bad gateway or failed dependency", "schema": { - "$ref": "./models/Order.yaml#/properties/context/properties/storeId" + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } } }, - { - "name": "orderId", - "in": "path", - "required": true, - "description": "The ID of the order", + "503": { + "description": "Service is temporarily unavailable", "schema": { - "$ref": "./models/Order.yaml#/properties/id" - } - } - ], - "responses": { - "200": { - "description": "Successfully archived the order", + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", "schema": { "type": "object", - "required": ["status", "order"], + "required": [ + "code" + ], "properties": { - "status": { + "code": { "type": "string", - "description": "Status of the response", - "example": "success" + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" }, - "order": { - "$ref": "#/components/schemas/Order" + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } } } } - }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "409": { - "description": "See #/components/responses/409" - }, - "422": { - "description": "See #/components/responses/422" - }, - "500": { - "description": "See #/components/responses/500" - }, - "502": { - "description": "See #/components/responses/502" - }, - "503": { - "description": "See #/components/responses/503" - }, - "504": { - "description": "See #/components/responses/504" } }, - "scopes": ["commerce.order:archive"] + "scopes": [ + "commerce.return:read" + ] }, { - "operationId": "cancelOrder", + "operationId": "createReturnPreview", "method": "POST", - "path": "/v1/commerce/stores/{storeId}/orders/{orderId}/cancel", - "summary": "Cancel an order", - "description": "Cancel an order using the store and order IDs.", + "path": "/v1/commerce/stores/{storeId}/orders/{orderId}/return-previews", + "summary": "Preview a return with calculated refunds", + "description": "Preview a return and calculate refund amounts before creating the actual return. This endpoint calculates detailed refund adjustments including item-level refunds (purchase, taxes, discounts, fees) and order-level adjustments (order discounts, fees, additional taxes, shipping). Supports multiple refund modes for order-level adjustments and shipping costs.", "parameters": [ { "name": "storeId", @@ -866,7 +58370,9 @@ "required": true, "description": "Store ID", "schema": { - "$ref": "./models/Order.yaml#/properties/context/properties/storeId" + "type": "string", + "description": "ID of the store that the order belongs to", + "example": "fd3d9291-dc9a-445d-aa68-d2ff1a77a83c" } }, { @@ -875,505 +58381,1458 @@ "required": true, "description": "The ID of the order", "schema": { - "$ref": "./models/Order.yaml#/properties/id" + "type": "string", + "description": "An identifier unique to the order (Order_). Auto-generated by the service on creation", + "readOnly": true, + "example": "Order_2G5VsWEFhIktH8PY4qC0iOGDpVJ" } } ], + "requestBody": { + "required": true, + "description": "The return preview request with items and refund calculation options", + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-preview.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnPreview", + "type": "object", + "description": "A return preview resource for calculating refund amounts before creating an actual return.\nSupports both request (input) and response (output) scenarios using readOnly/writeOnly annotations.\n\nRequest fields: items (required), status, restockTriggerStatus, context, orderLevelAdjustmentsRefund, shippingRefund\nResponse fields: All request fields plus orderId, calculated adjustments, and preview metadata\n", + "required": [ + "items" + ], + "$defs": { + "adjustmentBase": { + "type": "object", + "description": "Base schema for return preview adjustments", + "required": [ + "type", + "amount" + ], + "properties": { + "amount": { + "description": "The amount of the adjustment", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "name": { + "type": "string", + "description": "The name of the adjustment" + }, + "referenceId": { + "type": [ + "string", + "null" + ], + "description": "The ID of the fee, discount, tax, etc. that the adjustment is associated with" + } + } + } + }, + "properties": { + "orderId": { + "type": "string", + "readOnly": true, + "description": "The order ID that the return is associated with (echoed from URL path parameter in response)" + }, + "status": { + "type": "string", + "description": "Order return status (defaults to REQUESTED if not provided)", + "default": "REQUESTED", + "enum": [ + "REQUESTED", + "APPROVED_FOR_RETURN", + "RECEIVED", + "PROCESSING", + "APPROVED", + "REJECTED", + "COMPLETED", + "CANCELED" + ] + }, + "restockTriggerStatus": { + "type": "string", + "description": "The order return status that triggers automatic inventory adjustment", + "enum": [ + "REQUESTED", + "APPROVED_FOR_RETURN", + "RECEIVED", + "PROCESSING", + "APPROVED", + "REJECTED", + "COMPLETED", + "CANCELED" + ] + }, + "context": { + "type": "object", + "description": "Context for the return", + "properties": { + "channelId": { + "type": "string", + "description": "ID of the channel where the return was made" + } + } + }, + "items": { + "type": "array", + "description": "The items being returned", + "items": { + "type": "object", + "required": [ + "lineItemId", + "quantity" + ], + "properties": { + "lineItemId": { + "type": "string", + "description": "The line item id that the return item is associated with" + }, + "quantity": { + "type": "number", + "description": "The quantity of the line item being returned (can be float, e.g., 2.3 Kgs)", + "format": "float", + "exclusiveMinimum": 0 + }, + "reason": { + "type": "string", + "description": "The reason for the return", + "enum": [ + "WRONG_SIZE", + "DEFECTIVE_ITEM", + "NOT_AS_DESCRIBED", + "BETTER_PRICE_ELSEWHERE", + "UNWANTED_GIFT", + "CHANGED_MIND", + "LATE_DELIVERY", + "ORDERED_BY_MISTAKE", + "OTHER" + ] + }, + "otherReason": { + "type": "string", + "description": "The reason for the return if the reason is `OTHER`" + }, + "restockQuantity": { + "type": "number", + "description": "The quantity of the line item that will be restocked (can be any number, including 0)", + "format": "float" + }, + "locationId": { + "type": "string", + "description": "The location ID where the item should be returned" + }, + "adjustments": { + "type": "array", + "readOnly": true, + "description": "Calculated refund adjustments for this item (purchase, taxes, discounts, fees).\nOnly present in response - calculated by the server based on order data and refund mode.\n", + "items": { + "allOf": [ + { + "type": "object", + "description": "Base schema for return preview adjustments", + "required": [ + "type", + "amount" + ], + "properties": { + "amount": { + "description": "The amount of the adjustment", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "name": { + "type": "string", + "description": "The name of the adjustment" + }, + "referenceId": { + "type": [ + "string", + "null" + ], + "description": "The ID of the fee, discount, tax, etc. that the adjustment is associated with" + } + } + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of the adjustment", + "enum": [ + "PURCHASE", + "FEE", + "DISCOUNT", + "TAX" + ] + }, + "name": { + "type": "string", + "description": "The name of the adjustment (e.g., \"Sales Tax\", \"Discount Code\"). Not present for PURCHASE type adjustments." + } + } + } + ] + } + } + } + } + }, + "orderLevelAdjustmentsRefund": { + "type": "string", + "writeOnly": true, + "description": "How to handle order-level adjustments refund (discounts, fees, additional taxes).\nOnly used in request to control calculation mode - not returned in response.\n\n- PRORATED: Distribute refund based on item value proportion\n- FULL: Refund all order-level adjustments on first return\n- NONE: Do not refund order-level adjustments\n", + "default": "PRORATED", + "enum": [ + "PRORATED", + "FULL", + "NONE" + ] + }, + "shippingRefund": { + "type": "string", + "writeOnly": true, + "description": "How to handle shipping costs refund.\nOnly used in request to control calculation mode - not returned in response.\n\n- PRORATED: Distribute refund based on item value proportion\n- FULL: Refund all shipping costs on first return\n- NONE: Do not refund shipping costs\n", + "default": "NONE", + "enum": [ + "PRORATED", + "FULL", + "NONE" + ] + }, + "adjustments": { + "type": "array", + "readOnly": true, + "description": "Calculated order-level and shipping adjustments (only present in response).\nIncludes proportional share of order discounts, fees, additional taxes, and shipping costs\nbased on the refund modes specified in the request.\n", + "items": { + "allOf": [ + { + "type": "object", + "description": "Base schema for return preview adjustments", + "required": [ + "type", + "amount" + ], + "properties": { + "amount": { + "description": "The amount of the adjustment", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "name": { + "type": "string", + "description": "The name of the adjustment" + }, + "referenceId": { + "type": [ + "string", + "null" + ], + "description": "The ID of the fee, discount, tax, etc. that the adjustment is associated with" + } + } + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of the adjustment", + "enum": [ + "SHIPPING", + "SHIPPING_TAX", + "FEE", + "DISCOUNT", + "TAX" + ] + }, + "name": { + "type": "string", + "description": "The name of the adjustment (e.g., \"Shipping\", \"Order Discount\")" + } + } + } + ] + } + }, + "preview": { + "type": "object", + "readOnly": true, + "description": "Additional preview information with refund totals breakdown (only present in response).\nNot included when creating an actual return - this is metadata specific to the preview calculation.\n", + "required": [ + "totals" + ], + "properties": { + "totals": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-preview-total.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnPreviewTotal", + "type": "object", + "description": "Breakdown of refund totals by type for return preview calculations.\nThis schema is specific to the preview endpoint and uses integer representation for calculation simplicity.\nAll values represent absolute amounts (positive integers) in the smallest currency unit (e.g., cents).\n", + "required": [ + "purchase", + "tax", + "discount", + "fee", + "shipping", + "total", + "currencyCode" + ], + "properties": { + "purchase": { + "type": "integer", + "description": "Total purchase refund amount (sum of all item purchase adjustments)", + "minimum": 0 + }, + "tax": { + "type": "integer", + "description": "Total tax refund amount (includes item taxes, order-level taxes, and shipping taxes)", + "minimum": 0 + }, + "discount": { + "type": "integer", + "description": "Total discount refund amount (includes item and order-level discounts)", + "minimum": 0 + }, + "fee": { + "type": "integer", + "description": "Total fee refund amount (includes item and order-level fees)", + "minimum": 0 + }, + "shipping": { + "type": "integer", + "description": "Total shipping refund amount", + "minimum": 0 + }, + "total": { + "type": "integer", + "description": "Total refund amount calculated as: purchase + tax + fee + shipping - discount.\nAll values represent absolute amounts (positive integers).\n", + "minimum": 0 + }, + "currencyCode": { + "type": "string", + "description": "Currency code for all amounts (e.g., USD, EUR)", + "pattern": "^[A-Z]{3}$", + "examples": [ + "USD", + "EUR", + "GBP" + ] + } + } + } + } + } + } + } + }, "responses": { "200": { - "description": "Successfully canceled the order", + "description": "Successfully calculated return preview with refund adjustments", "schema": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-preview.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnPreview", "type": "object", - "required": ["status", "order"], + "description": "A return preview resource for calculating refund amounts before creating an actual return.\nSupports both request (input) and response (output) scenarios using readOnly/writeOnly annotations.\n\nRequest fields: items (required), status, restockTriggerStatus, context, orderLevelAdjustmentsRefund, shippingRefund\nResponse fields: All request fields plus orderId, calculated adjustments, and preview metadata\n", + "required": [ + "items" + ], + "$defs": { + "adjustmentBase": { + "type": "object", + "description": "Base schema for return preview adjustments", + "required": [ + "type", + "amount" + ], + "properties": { + "amount": { + "description": "The amount of the adjustment", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "name": { + "type": "string", + "description": "The name of the adjustment" + }, + "referenceId": { + "type": [ + "string", + "null" + ], + "description": "The ID of the fee, discount, tax, etc. that the adjustment is associated with" + } + } + } + }, "properties": { + "orderId": { + "type": "string", + "readOnly": true, + "description": "The order ID that the return is associated with (echoed from URL path parameter in response)" + }, "status": { "type": "string", - "description": "Status of the response", - "example": "success" + "description": "Order return status (defaults to REQUESTED if not provided)", + "default": "REQUESTED", + "enum": [ + "REQUESTED", + "APPROVED_FOR_RETURN", + "RECEIVED", + "PROCESSING", + "APPROVED", + "REJECTED", + "COMPLETED", + "CANCELED" + ] }, - "order": { - "$ref": "#/components/schemas/Order" + "restockTriggerStatus": { + "type": "string", + "description": "The order return status that triggers automatic inventory adjustment", + "enum": [ + "REQUESTED", + "APPROVED_FOR_RETURN", + "RECEIVED", + "PROCESSING", + "APPROVED", + "REJECTED", + "COMPLETED", + "CANCELED" + ] + }, + "context": { + "type": "object", + "description": "Context for the return", + "properties": { + "channelId": { + "type": "string", + "description": "ID of the channel where the return was made" + } + } + }, + "items": { + "type": "array", + "description": "The items being returned", + "items": { + "type": "object", + "required": [ + "lineItemId", + "quantity" + ], + "properties": { + "lineItemId": { + "type": "string", + "description": "The line item id that the return item is associated with" + }, + "quantity": { + "type": "number", + "description": "The quantity of the line item being returned (can be float, e.g., 2.3 Kgs)", + "format": "float", + "exclusiveMinimum": 0 + }, + "reason": { + "type": "string", + "description": "The reason for the return", + "enum": [ + "WRONG_SIZE", + "DEFECTIVE_ITEM", + "NOT_AS_DESCRIBED", + "BETTER_PRICE_ELSEWHERE", + "UNWANTED_GIFT", + "CHANGED_MIND", + "LATE_DELIVERY", + "ORDERED_BY_MISTAKE", + "OTHER" + ] + }, + "otherReason": { + "type": "string", + "description": "The reason for the return if the reason is `OTHER`" + }, + "restockQuantity": { + "type": "number", + "description": "The quantity of the line item that will be restocked (can be any number, including 0)", + "format": "float" + }, + "locationId": { + "type": "string", + "description": "The location ID where the item should be returned" + }, + "adjustments": { + "type": "array", + "readOnly": true, + "description": "Calculated refund adjustments for this item (purchase, taxes, discounts, fees).\nOnly present in response - calculated by the server based on order data and refund mode.\n", + "items": { + "allOf": [ + { + "type": "object", + "description": "Base schema for return preview adjustments", + "required": [ + "type", + "amount" + ], + "properties": { + "amount": { + "description": "The amount of the adjustment", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "name": { + "type": "string", + "description": "The name of the adjustment" + }, + "referenceId": { + "type": [ + "string", + "null" + ], + "description": "The ID of the fee, discount, tax, etc. that the adjustment is associated with" + } + } + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of the adjustment", + "enum": [ + "PURCHASE", + "FEE", + "DISCOUNT", + "TAX" + ] + }, + "name": { + "type": "string", + "description": "The name of the adjustment (e.g., \"Sales Tax\", \"Discount Code\"). Not present for PURCHASE type adjustments." + } + } + } + ] + } + } + } + } + }, + "orderLevelAdjustmentsRefund": { + "type": "string", + "writeOnly": true, + "description": "How to handle order-level adjustments refund (discounts, fees, additional taxes).\nOnly used in request to control calculation mode - not returned in response.\n\n- PRORATED: Distribute refund based on item value proportion\n- FULL: Refund all order-level adjustments on first return\n- NONE: Do not refund order-level adjustments\n", + "default": "PRORATED", + "enum": [ + "PRORATED", + "FULL", + "NONE" + ] + }, + "shippingRefund": { + "type": "string", + "writeOnly": true, + "description": "How to handle shipping costs refund.\nOnly used in request to control calculation mode - not returned in response.\n\n- PRORATED: Distribute refund based on item value proportion\n- FULL: Refund all shipping costs on first return\n- NONE: Do not refund shipping costs\n", + "default": "NONE", + "enum": [ + "PRORATED", + "FULL", + "NONE" + ] + }, + "adjustments": { + "type": "array", + "readOnly": true, + "description": "Calculated order-level and shipping adjustments (only present in response).\nIncludes proportional share of order discounts, fees, additional taxes, and shipping costs\nbased on the refund modes specified in the request.\n", + "items": { + "allOf": [ + { + "type": "object", + "description": "Base schema for return preview adjustments", + "required": [ + "type", + "amount" + ], + "properties": { + "amount": { + "description": "The amount of the adjustment", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money with Fixed Precision", + "properties": { + "currencyCode": { + "type": "string", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "minimum": 0, + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "name": { + "type": "string", + "description": "The name of the adjustment" + }, + "referenceId": { + "type": [ + "string", + "null" + ], + "description": "The ID of the fee, discount, tax, etc. that the adjustment is associated with" + } + } + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of the adjustment", + "enum": [ + "SHIPPING", + "SHIPPING_TAX", + "FEE", + "DISCOUNT", + "TAX" + ] + }, + "name": { + "type": "string", + "description": "The name of the adjustment (e.g., \"Shipping\", \"Order Discount\")" + } + } + } + ] + } + }, + "preview": { + "type": "object", + "readOnly": true, + "description": "Additional preview information with refund totals breakdown (only present in response).\nNot included when creating an actual return - this is metadata specific to the preview calculation.\n", + "required": [ + "totals" + ], + "properties": { + "totals": { + "$id": "https://godaddy.com/schemas/commerce/orders/return-preview-total.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReturnPreviewTotal", + "type": "object", + "description": "Breakdown of refund totals by type for return preview calculations.\nThis schema is specific to the preview endpoint and uses integer representation for calculation simplicity.\nAll values represent absolute amounts (positive integers) in the smallest currency unit (e.g., cents).\n", + "required": [ + "purchase", + "tax", + "discount", + "fee", + "shipping", + "total", + "currencyCode" + ], + "properties": { + "purchase": { + "type": "integer", + "description": "Total purchase refund amount (sum of all item purchase adjustments)", + "minimum": 0 + }, + "tax": { + "type": "integer", + "description": "Total tax refund amount (includes item taxes, order-level taxes, and shipping taxes)", + "minimum": 0 + }, + "discount": { + "type": "integer", + "description": "Total discount refund amount (includes item and order-level discounts)", + "minimum": 0 + }, + "fee": { + "type": "integer", + "description": "Total fee refund amount (includes item and order-level fees)", + "minimum": 0 + }, + "shipping": { + "type": "integer", + "description": "Total shipping refund amount", + "minimum": 0 + }, + "total": { + "type": "integer", + "description": "Total refund amount calculated as: purchase + tax + fee + shipping - discount.\nAll values represent absolute amounts (positive integers).\n", + "minimum": 0 + }, + "currencyCode": { + "type": "string", + "description": "Currency code for all amounts (e.g., USD, EUR)", + "pattern": "^[A-Z]{3}$", + "examples": [ + "USD", + "EUR", + "GBP" + ] + } + } + } + } } } } }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "409": { - "description": "See #/components/responses/409" - }, - "422": { - "description": "See #/components/responses/422" - }, - "500": { - "description": "See #/components/responses/500" - }, - "502": { - "description": "See #/components/responses/502" - }, - "503": { - "description": "See #/components/responses/503" - }, - "504": { - "description": "See #/components/responses/504" - } - }, - "scopes": ["commerce.order:cancel"] - }, - { - "operationId": "completeOrder", - "method": "POST", - "path": "/v1/commerce/stores/{storeId}/orders/{orderId}/complete", - "summary": "Complete an order", - "description": "Complete an order using the store and order IDs.", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "Store ID", + "400": { + "description": "Request validation error", "schema": { - "$ref": "./models/Order.yaml#/properties/context/properties/storeId" + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } } }, - { - "name": "orderId", - "in": "path", - "required": true, - "description": "The ID of the order", + "401": { + "description": "Authentication info not sent or is invalid", "schema": { - "$ref": "./models/Order.yaml#/properties/id" + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } } - } - ], - "responses": { - "200": { - "description": "Successfully completed the order", + }, + "403": { + "description": "Authenticated user is not allowed access", "schema": { "type": "object", - "required": ["status", "order"], + "required": [ + "code" + ], "properties": { - "status": { + "code": { "type": "string", - "description": "Status of the response", - "example": "success" + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" }, - "order": { - "$ref": "#/components/schemas/Order" + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } } } } }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, "404": { - "description": "See #/components/responses/404" - }, - "409": { - "description": "See #/components/responses/409" - }, - "422": { - "description": "See #/components/responses/422" - }, - "500": { - "description": "See #/components/responses/500" - }, - "502": { - "description": "See #/components/responses/502" - }, - "503": { - "description": "See #/components/responses/503" - }, - "504": { - "description": "See #/components/responses/504" - } - }, - "scopes": ["commerce.order:complete"] - }, - { - "operationId": "createReturn", - "method": "POST", - "path": "/v1/commerce/stores/{storeId}/returns", - "summary": "Create a return for an order", - "description": "Create a return for an order", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "Store ID", - "schema": { - "$ref": "./models/Order.yaml#/properties/context/properties/storeId" - } - } - ], - "requestBody": { - "required": true, - "description": "The Return object to create", - "contentType": "application/json", - "schema": { - "$ref": "#/components/schemas/Return" - } - }, - "responses": { - "200": { - "description": "Successfully created the return", + "description": "Resource not found", "schema": { - "$ref": "#/components/schemas/Return" + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } } }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, "409": { - "description": "See #/components/responses/409" - }, - "422": { - "description": "See #/components/responses/422" - }, - "500": { - "description": "See #/components/responses/500" - }, - "502": { - "description": "See #/components/responses/502" - }, - "503": { - "description": "See #/components/responses/503" - }, - "504": { - "description": "See #/components/responses/504" - } - }, - "scopes": ["commerce.return:create"] - }, - { - "operationId": "findReturn", - "method": "GET", - "path": "/v1/commerce/stores/{storeId}/returns/{returnId}", - "summary": "Find a return", - "description": "Find a single return.", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "Store ID", - "schema": { - "$ref": "./models/Order.yaml#/properties/context/properties/storeId" - } - }, - { - "name": "returnId", - "in": "path", - "required": true, - "description": "The ID of the return", - "schema": { - "type": "string", - "format": "uuid", - "description": "UUID of the return" - } - } - ], - "responses": { - "200": { - "description": "Successfully found the return", + "description": "Application-specific server state error", "schema": { - "$ref": "#/components/schemas/Return" + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } } }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "409": { - "description": "See #/components/responses/409" - }, "422": { - "description": "See #/components/responses/422" - }, - "500": { - "description": "See #/components/responses/500" - }, - "502": { - "description": "See #/components/responses/502" - }, - "503": { - "description": "See #/components/responses/503" - }, - "504": { - "description": "See #/components/responses/504" - } - }, - "scopes": ["commerce.return:read"] - }, - { - "operationId": "patchReturn", - "method": "PATCH", - "path": "/v1/commerce/stores/{storeId}/returns/{returnId}", - "summary": "Modify an existing return", - "description": "Modify an existing return", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "Store ID", - "schema": { - "$ref": "./models/Order.yaml#/properties/context/properties/storeId" - } - }, - { - "name": "returnId", - "in": "path", - "required": true, - "description": "The ID of the return", + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", "schema": { - "type": "string", - "format": "uuid", - "description": "UUID of the return" - } - } - ], - "requestBody": { - "required": true, - "description": "The return object to patch", - "contentType": "application/json", - "schema": { - "type": "array", - "items": { "type": "object", - "title": "Patch", - "description": "The JSON patch object to apply partial updates to resources.", + "required": [ + "code" + ], "properties": { - "op": { + "code": { "type": "string", - "description": "The operation to complete.", - "enum": ["add", "remove", "replace", "move", "copy", "test"] + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" }, - "path": { + "message": { "type": "string", - "description": "The JSON pointer to the target document location at which to complete the operation." + "description": "Human-readable, English description of the error" }, - "value": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "integer" - }, - { - "type": "string" - }, - { - "type": "boolean" - }, - { - "type": "array", - "items": {} - }, - { - "type": "object" + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } } - ], - "nullable": true, - "description": "The value to apply. The `remove` operation does not require a value." + } }, - "from": { - "type": "string", - "description": "The JSON pointer to the target document location from which to move the value. Required for the `move` operation." + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } } - }, - "required": ["op"] - } - } - }, - "responses": { - "200": { - "description": "Successfully patched the return status", - "schema": { - "$ref": "#/components/schemas/Return" + } } }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "409": { - "description": "See #/components/responses/409" - }, - "422": { - "description": "See #/components/responses/422" - }, - "500": { - "description": "See #/components/responses/500" - }, "502": { - "description": "See #/components/responses/502" - }, - "503": { - "description": "See #/components/responses/503" - }, - "504": { - "description": "See #/components/responses/504" - } - }, - "scopes": ["commerce.return:update"] - }, - { - "operationId": "deleteReturn", - "method": "DELETE", - "path": "/v1/commerce/stores/{storeId}/returns/{returnId}", - "summary": "Delete a return", - "description": "Delete a single return.", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "Store ID", + "description": "Bad gateway or failed dependency", "schema": { - "$ref": "./models/Order.yaml#/properties/context/properties/storeId" - } - }, - { - "name": "returnId", - "in": "path", - "required": true, - "description": "The ID of the return", - "schema": { - "type": "string", - "format": "uuid", - "description": "UUID of the return" + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } } - } - ], - "responses": { - "204": { - "description": "Successfully deleted the return" - }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "409": { - "description": "See #/components/responses/409" - }, - "422": { - "description": "See #/components/responses/422" - }, - "500": { - "description": "See #/components/responses/500" - }, - "502": { - "description": "See #/components/responses/502" }, "503": { - "description": "See #/components/responses/503" - }, - "504": { - "description": "See #/components/responses/504" - } - }, - "scopes": ["commerce.return:delete"] - }, - { - "operationId": "queryOrderReturns", - "method": "GET", - "path": "/v1/commerce/stores/{storeId}/orders/{orderId}/returns", - "summary": "Find returns for an order", - "description": "Find returns for an order", - "parameters": [ - { - "name": "storeId", - "in": "path", - "required": true, - "description": "Store ID", + "description": "Service is temporarily unavailable", "schema": { - "$ref": "./models/Order.yaml#/properties/context/properties/storeId" + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } } }, - { - "name": "orderId", - "in": "path", - "required": true, - "description": "The ID of the order", - "schema": { - "$ref": "./models/Order.yaml#/properties/id" - } - } - ], - "responses": { - "200": { - "description": "Successfully listed returns", + "504": { + "description": "Gateway or dependency timeout", "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Return" + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } } } - }, - "401": { - "description": "See #/components/responses/401" - }, - "403": { - "description": "See #/components/responses/403" - }, - "404": { - "description": "See #/components/responses/404" - }, - "409": { - "description": "See #/components/responses/409" - }, - "422": { - "description": "See #/components/responses/422" - }, - "500": { - "description": "See #/components/responses/500" - }, - "502": { - "description": "See #/components/responses/502" - }, - "503": { - "description": "See #/components/responses/503" - }, - "504": { - "description": "See #/components/responses/504" } }, - "scopes": ["commerce.return:read"] + "scopes": [ + "commerce.return:read" + ] } ] -} +} \ No newline at end of file diff --git a/src/cli/schemas/api/payment-requests.json b/src/cli/schemas/api/payment-requests.json new file mode 100644 index 0000000..38254a4 --- /dev/null +++ b/src/cli/schemas/api/payment-requests.json @@ -0,0 +1,9057 @@ +{ + "name": "payment-requests", + "title": "Payment Requests API", + "description": "This API is capable of creating, updating and fetching payment requests across different stores.", + "version": "1.1.0", + "baseUrl": "https://api.godaddy.com/v1/commerce", + "endpoints": [ + { + "operationId": "getPaymentRequests", + "method": "GET", + "path": "/stores/{storeId}/payment-requests", + "summary": "Get all payment requests", + "description": "Retrieve all the payment requests for a specific store using the store ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Unique identifier for the store", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "X-Request-Id", + "in": "header", + "required": false, + "description": "Unique request identifier for idempotency and tracing. Used to prevent duplicate payment requests.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "Page number (1-indexed)", + "schema": { + "type": "integer", + "default": 1, + "minimum": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "Number of items per page", + "schema": { + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "description": "Token for retrieving the next page of results. This optimizes query execution on large datasets \nby continuing from a specific point rather than recalculating offsets. When provided, the 'page' parameter is ignored.\nObtained from the 'next' link in the previous response.\n", + "schema": { + "type": "string" + } + }, + { + "name": "updatedAtAfter", + "in": "query", + "required": false, + "description": "Payment request filter updatedAt start date. Defaults to 1 day ago if not specified.", + "schema": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + { + "name": "updatedAtBefore", + "in": "query", + "required": false, + "description": "Payment request filter updatedAt end date", + "schema": { + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + { + "name": "status", + "in": "query", + "required": false, + "description": "Filter by payment request status", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment-request/payment-request-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request Status", + "type": "string", + "enum": [ + "RECEIVED", + "QUEUED", + "IN_PROGRESS", + "FAILED", + "COMPLETED" + ], + "description": "Current status of the payment request in its lifecycle.\n\n**Status Flow:**\n- **RECEIVED**: Initial status when payment request is created\n- **QUEUED**: Payment request is queued for processing\n- **IN_PROGRESS**: Payment is being processed on the device\n- **COMPLETED**: Payment successfully processed and transactions created\n- **FAILED**: Payment failed due to error or customer cancellation\n" + } + }, + { + "name": "deviceId", + "in": "query", + "required": false, + "description": "Filter by device identifier", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "Filter by payment request type", + "schema": { + "type": "string" + } + }, + { + "name": "sortBy", + "in": "query", + "required": false, + "description": "Payment request sort field", + "schema": { + "type": "string", + "enum": [ + "updatedAt" + ], + "default": "updatedAt" + } + }, + { + "name": "sortOrder", + "in": "query", + "required": false, + "description": "Payment request sort order", + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ], + "default": "ASC" + } + } + ], + "responses": { + "200": { + "description": "Payment Requests List", + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "currentPage": { + "type": "integer", + "description": "Current page number" + }, + "pageSize": { + "type": "integer", + "description": "Number of items per page" + }, + "pageToken": { + "type": "string", + "description": "Token for retrieving the next page of results. Use this value in the pageToken query parameter for the next request." + }, + "links": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } + } + ], + "properties": { + "items": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment-request.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request", + "type": "object", + "description": "A Payment Request represents an intent to process a payment transaction. It contains all the necessary \ninformation to initiate payment processing on a device and track the payment lifecycle from creation \nthrough completion.\n\n**Lifecycle Overview:**\n1. Created with initial status (RECEIVED/QUEUED)\n2. Sent to device for customer interaction\n3. Customer completes payment flow on device\n4. Transaction(s) created and associated with payment request\n5. Final status reached (COMPLETED/FAILED)\n\n**Key Concepts:**\n- **Async Processing**: Payment requests are processed asynchronously with status updates via callbacks\n- **Device Integration**: Payment requests are sent to physical payment devices (terminals, tablets, etc.)\n- **Activity Tracking**: All interactions and events are logged in the activities array\n- **Transaction Association**: Completed payments generate transaction records linked via transactionIds\n\n**Integration Patterns:**\n- Use callbacks for real-time status updates during async processing\n- Poll the GET endpoint if callbacks are not configured\n- Monitor activities array for detailed payment flow tracking\n- Handle race conditions gracefully (payment may complete while processing other operations)\n", + "properties": { + "paymentRequestId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true, + "example": "a1b2c3d4-e5f6-4789-9abc-def123456789" + }, + "type": { + "type": "string", + "description": "Type of payment request indicating the transaction operation (AUTHORIZE, SALE, REFUND, etc.)", + "example": "SALE" + }, + "transactionRefNum": { + "type": "string", + "format": "uuid", + "description": "Optional merchant reference number for tracking (UUID format)", + "example": "a1b2c3d4-e5f6-4789-9abc-def123456789" + }, + "originalTransactionId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "example": "b2c3d4e5-f6a7-8901-bcde-f123456789ab" + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true, + "example": "12345678-90ab-cdef-1234-567890abcdef" + }, + "deviceId": { + "type": "string", + "description": "Device identifier for this payment request (UUID or URN format)", + "example": "urn:tid:2cf6f478-e7c6-3378-8cda-74ee60715e13" + }, + "amount": null, + "paymentInstructions": { + "description": "Non-sensitive payment instructions passed to the device (e.g. skip signature, force PIN entry)", + "example": { + "skipSignature": true, + "forcePIN": false, + "tipEnabled": true, + "tipPercentage": 18, + "maxTipAmount": 100.5, + "receiptType": "email", + "timeoutSeconds": 120, + "enableContactless": true + }, + "$id": "https://godaddy.com/schemas/commerce/payment-request/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "oneOf": [ + { + "type": "string", + "maxLength": 256 + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z", + "readOnly": true + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "Updated time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z", + "readOnly": true + }, + "status": { + "description": "Current status of the payment request in its lifecycle", + "readOnly": true, + "example": "RECEIVED", + "$id": "https://godaddy.com/schemas/commerce/payment-request/payment-request-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request Status", + "type": "string", + "enum": [ + "RECEIVED", + "QUEUED", + "IN_PROGRESS", + "FAILED", + "COMPLETED" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Optional notes about the payment request", + "example": "Table 5 - Split payment with card" + }, + "references": { + "type": "array", + "items": null, + "description": "External system references for tracking", + "example": [ + { + "type": "order_id", + "value": "ORD-2024-001", + "additionalLabel": "POS Order" + }, + { + "type": "invoice_number", + "value": "INV-456789" + } + ] + }, + "transactionIds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "description": "Transaction IDs created from this payment request (populated after processing)", + "readOnly": true, + "example": [ + "11111111-2222-3333-4444-555555555555" + ] + }, + "links": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + }, + "description": "HATEOAS links for related operations" + }, + "activities": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment-request/activity.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request Activity", + "type": "object", + "description": "Activity record for a payment request", + "properties": { + "type": { + "type": "string", + "description": "Type of activity performed on the payment request", + "example": "CREATED" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the activity occurred in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "data": { + "type": "object", + "description": "Additional context data for the activity", + "additionalProperties": true, + "example": { + "userId": "user123", + "transactionId": "txn456", + "deviceId": "dev789" + } + } + }, + "required": [ + "type", + "timestamp" + ] + }, + "description": "Chronological log of all activities and events for this payment request", + "readOnly": true, + "example": [ + { + "type": "PAYMENT_REQUEST_RECEIVED", + "timestamp": "2024-01-15T10:30:00Z", + "data": { + "deviceId": "terminal-123" + } + }, + { + "type": "CUSTOMER_ENTERED_TIP", + "timestamp": "2024-01-15T10:31:15Z", + "data": { + "tipAmount": 2.5 + } + } + ] + }, + "callbackConfig": { + "description": "Optional configuration for async status notifications", + "$id": "https://godaddy.com/schemas/commerce/payment-request/callback-configuration.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Callback Configuration", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "HTTPS callback URL where notifications will be sent", + "pattern": "^https://", + "example": "https://client.example.com/webhooks/payment-requests" + }, + "authentication": { + "description": "Optional authentication configuration for callback requests.\nIf not provided, no authentication headers will be sent.\nHMAC authentication is recommended for production environments.\n", + "$id": "https://godaddy.com/schemas/commerce/payment-request/callback-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Callback Authentication", + "discriminator": { + "propertyName": "type", + "mapping": { + "hmac": "./HMACAuthentication.yaml", + "bearer": "./BearerTokenAuthentication.yaml", + "apikey": "./APIKeyAuthentication.yaml", + "none": "./NoAuthentication.yaml" + } + }, + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment-request/hmac-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "HMAC Authentication", + "type": "object", + "description": "HMAC authentication using shared secret for payload signing", + "properties": { + "type": { + "type": "string", + "const": "hmac", + "description": "Authentication method for callback requests" + }, + "value": { + "type": "string", + "description": "Shared secret key for payload signing.\n\nWhen using HMAC, the service sends fixed standard headers:\n- X-Signature: HMAC signature of the payload\n- X-Timestamp: Unix timestamp when request was sent\n- X-Request-Id: Unique request identifier for tracing\n", + "example": "your-shared-secret-key" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment-request/bearer-token-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bearer Token Authentication", + "type": "object", + "description": "Bearer token authentication using Authorization header", + "properties": { + "type": { + "type": "string", + "const": "bearer", + "description": "Authentication method for callback requests" + }, + "value": { + "type": "string", + "description": "Bearer token for Authorization header", + "example": "sample-jwt" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment-request/apikey-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "API Key Authentication", + "type": "object", + "description": "API key authentication using custom or default header", + "properties": { + "type": { + "type": "string", + "const": "apikey", + "description": "Authentication method for callback requests" + }, + "value": { + "type": "string", + "description": "API key value for custom header", + "example": "client-api-key-12345" + }, + "headerName": { + "type": "string", + "description": "Custom header name for API key authentication.\nDefaults to 'X-API-Key' if not specified.\n", + "example": "X-Custom-API-Key", + "default": "X-API-Key" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment-request/no-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "No Authentication", + "type": "object", + "description": "No authentication (development only)", + "properties": { + "type": { + "type": "string", + "const": "none", + "description": "Authentication method for callback requests" + } + }, + "required": [ + "type" + ] + } + ], + "examples": [ + { + "type": "hmac", + "value": "your-shared-secret-key" + }, + { + "type": "bearer", + "value": "sample-jwt" + }, + { + "type": "apikey", + "value": "client-api-key-12345" + }, + { + "type": "apikey", + "value": "client-api-key-12345", + "headerName": "X-Client-API-Key" + }, + { + "type": "none" + } + ] + }, + "payloadConfig": { + "description": "Configuration for what data to include in callback payloads", + "$id": "https://godaddy.com/schemas/commerce/payment-request/callback-payload-configuration.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Callback Payload Configuration", + "type": "object", + "properties": { + "includeFields": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "paymentRequestId", + "type", + "transactionRefNum", + "storeId", + "deviceId", + "amount", + "paymentInstructions", + "notes", + "references", + "transactionIds", + "links", + "activities", + "createdAt", + "updatedAt", + "transactions" + ] + }, + "description": "Array of field names to include in callback payload.\n\nReal Fields (PaymentRequest properties):\n- paymentRequestId, type, transactionRefNum, storeId, deviceId, amount\n- paymentInstructions, notes, references, transactionIds, links, activities\n- createdAt, updatedAt\n\nVirtual Fields (computed/expanded):\n- 'transactions': Expands transactionIds to full transaction objects (only virtual field currently supported)\n", + "minItems": 1 + }, + "legacyMode": { + "type": "boolean", + "description": "Schema version control for virtual field expansions:\n- true: Use v1 transaction schema for 'transactions' virtual field\n- false: Use v2 transaction schema for 'transactions' virtual field (default)\nOnly affects virtual fields; real PaymentRequest fields are unaffected.\n", + "default": false, + "example": false + } + }, + "required": [ + "includeFields" + ], + "examples": [ + { + "includeFields": [ + "paymentRequestId", + "type", + "amount" + ], + "legacyMode": false + }, + { + "includeFields": [ + "paymentRequestId", + "type", + "amount", + "storeId", + "transactionIds", + "activities" + ], + "legacyMode": false + }, + { + "includeFields": [ + "paymentRequestId", + "type", + "amount", + "storeId", + "transactionIds", + "transactions", + "activities" + ], + "legacyMode": false + }, + { + "includeFields": [ + "paymentRequestId", + "type", + "amount", + "transactions" + ], + "legacyMode": true + } + ] + }, + "events": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment-request/payment-request-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request Status", + "type": "string", + "enum": [ + "RECEIVED", + "QUEUED", + "IN_PROGRESS", + "FAILED", + "COMPLETED" + ], + "description": "Current status of the payment request in its lifecycle.\n\n**Status Flow:**\n- **RECEIVED**: Initial status when payment request is created\n- **QUEUED**: Payment request is queued for processing\n- **IN_PROGRESS**: Payment is being processed on the device\n- **COMPLETED**: Payment successfully processed and transactions created\n- **FAILED**: Payment failed due to error or customer cancellation\n" + }, + "description": "Array of payment request status values that should trigger callback notifications.\nEvents correspond to PaymentRequestStatus transitions.\n\nAvailable Events (from PaymentRequestStatus):\n- RECEIVED: When payment request is initially received\n- QUEUED: When payment request is queued for processing\n- IN_PROGRESS: When payment request processing begins\n- COMPLETED: When payment request processing is successfully completed\n- FAILED: When payment request processing fails\n", + "example": [ + "RECEIVED", + "COMPLETED", + "FAILED" + ] + } + }, + "required": [ + "url", + "payloadConfig" + ], + "examples": [ + { + "url": "https://client.example.com/webhooks/payment-requests", + "authentication": { + "type": "hmac", + "secret": "your-shared-secret-key" + }, + "payloadConfig": { + "includeFields": [ + "paymentRequestId", + "type", + "amount", + "storeId", + "transactions" + ], + "legacyMode": false + }, + "events": [ + "RECEIVED", + "COMPLETED", + "FAILED" + ] + }, + { + "url": "https://dev-client.example.com/webhooks", + "payloadConfig": { + "includeFields": [ + "paymentRequestId", + "type", + "amount" + ], + "legacyMode": false + }, + "events": [ + "COMPLETED" + ] + }, + { + "url": "https://legacy-client.example.com/callbacks", + "authentication": { + "type": "bearer", + "token": "legacy-bearer-token-12345" + }, + "payloadConfig": { + "includeFields": [ + "paymentRequestId", + "type", + "transactionIds", + "transactions" + ], + "legacyMode": true + }, + "events": [ + "COMPLETED", + "FAILED" + ] + } + ] + } + }, + "required": [ + "type", + "createdAt" + ] + } + } + } + } + }, + "default": { + "description": "Error response", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.payment-request:read" + ] + }, + { + "operationId": "createPaymentRequest", + "method": "POST", + "path": "/stores/{storeId}/payment-requests", + "summary": "Create a new payment request (Async)", + "description": "Create a new payment request for the specified store. This is an **asynchronous operation**.\n\n**Async Processing:**\n- Returns `202 Accepted` with immediate `paymentRequestId` for tracking\n- Processing happens in the background with status updates via callbacks\n- Use callbacks (if configured) or polling GET endpoint for completion status\n- Initial status will be `RECEIVED` or `QUEUED`\n\n**Idempotency:**\n- The `X-Request-Id` header is used for idempotency\n- Duplicate requests with the same `X-Request-Id` within 24 hours will return the existing payment request\n- This prevents duplicate payment requests due to network issues or retries\n\n**Required Properties:**\n- `amount` - Payment request amount\n- `type` - Payment request type\n\n**Optional Properties:**\n- `deviceId` - Device identifier for this payment request\n- `paymentInstructions` - Payment instructions\n- `notes` - Additional notes about the payment request\n- `references` - External system references\n- `callbackConfig` - Configuration for async status notifications\n\n**Idempotency:** This endpoint supports idempotency via the X-Request-Id header to prevent duplicate payment requests.\n", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Unique identifier for the store", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "X-Request-Id", + "in": "header", + "required": false, + "description": "Unique request identifier for idempotency and tracing. Used to prevent duplicate payment requests.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment-request.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request", + "type": "object", + "description": "A Payment Request represents an intent to process a payment transaction. It contains all the necessary \ninformation to initiate payment processing on a device and track the payment lifecycle from creation \nthrough completion.\n\n**Lifecycle Overview:**\n1. Created with initial status (RECEIVED/QUEUED)\n2. Sent to device for customer interaction\n3. Customer completes payment flow on device\n4. Transaction(s) created and associated with payment request\n5. Final status reached (COMPLETED/FAILED)\n\n**Key Concepts:**\n- **Async Processing**: Payment requests are processed asynchronously with status updates via callbacks\n- **Device Integration**: Payment requests are sent to physical payment devices (terminals, tablets, etc.)\n- **Activity Tracking**: All interactions and events are logged in the activities array\n- **Transaction Association**: Completed payments generate transaction records linked via transactionIds\n\n**Integration Patterns:**\n- Use callbacks for real-time status updates during async processing\n- Poll the GET endpoint if callbacks are not configured\n- Monitor activities array for detailed payment flow tracking\n- Handle race conditions gracefully (payment may complete while processing other operations)\n", + "properties": { + "paymentRequestId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true, + "example": "a1b2c3d4-e5f6-4789-9abc-def123456789" + }, + "type": { + "type": "string", + "description": "Type of payment request indicating the transaction operation (AUTHORIZE, SALE, REFUND, etc.)", + "example": "SALE" + }, + "transactionRefNum": { + "type": "string", + "format": "uuid", + "description": "Optional merchant reference number for tracking (UUID format)", + "example": "a1b2c3d4-e5f6-4789-9abc-def123456789" + }, + "originalTransactionId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "example": "b2c3d4e5-f6a7-8901-bcde-f123456789ab" + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true, + "example": "12345678-90ab-cdef-1234-567890abcdef" + }, + "deviceId": { + "type": "string", + "description": "Device identifier for this payment request (UUID or URN format)", + "example": "urn:tid:2cf6f478-e7c6-3378-8cda-74ee60715e13" + }, + "amount": null, + "paymentInstructions": { + "description": "Non-sensitive payment instructions passed to the device (e.g. skip signature, force PIN entry)", + "example": { + "skipSignature": true, + "forcePIN": false, + "tipEnabled": true, + "tipPercentage": 18, + "maxTipAmount": 100.5, + "receiptType": "email", + "timeoutSeconds": 120, + "enableContactless": true + }, + "$id": "https://godaddy.com/schemas/commerce/payment-request/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "oneOf": [ + { + "type": "string", + "maxLength": 256 + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z", + "readOnly": true + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "Updated time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z", + "readOnly": true + }, + "status": { + "description": "Current status of the payment request in its lifecycle", + "readOnly": true, + "example": "RECEIVED", + "$id": "https://godaddy.com/schemas/commerce/payment-request/payment-request-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request Status", + "type": "string", + "enum": [ + "RECEIVED", + "QUEUED", + "IN_PROGRESS", + "FAILED", + "COMPLETED" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Optional notes about the payment request", + "example": "Table 5 - Split payment with card" + }, + "references": { + "type": "array", + "items": null, + "description": "External system references for tracking", + "example": [ + { + "type": "order_id", + "value": "ORD-2024-001", + "additionalLabel": "POS Order" + }, + { + "type": "invoice_number", + "value": "INV-456789" + } + ] + }, + "transactionIds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "description": "Transaction IDs created from this payment request (populated after processing)", + "readOnly": true, + "example": [ + "11111111-2222-3333-4444-555555555555" + ] + }, + "links": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + }, + "description": "HATEOAS links for related operations" + }, + "activities": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment-request/activity.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request Activity", + "type": "object", + "description": "Activity record for a payment request", + "properties": { + "type": { + "type": "string", + "description": "Type of activity performed on the payment request", + "example": "CREATED" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the activity occurred in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "data": { + "type": "object", + "description": "Additional context data for the activity", + "additionalProperties": true, + "example": { + "userId": "user123", + "transactionId": "txn456", + "deviceId": "dev789" + } + } + }, + "required": [ + "type", + "timestamp" + ] + }, + "description": "Chronological log of all activities and events for this payment request", + "readOnly": true, + "example": [ + { + "type": "PAYMENT_REQUEST_RECEIVED", + "timestamp": "2024-01-15T10:30:00Z", + "data": { + "deviceId": "terminal-123" + } + }, + { + "type": "CUSTOMER_ENTERED_TIP", + "timestamp": "2024-01-15T10:31:15Z", + "data": { + "tipAmount": 2.5 + } + } + ] + }, + "callbackConfig": { + "description": "Optional configuration for async status notifications", + "$id": "https://godaddy.com/schemas/commerce/payment-request/callback-configuration.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Callback Configuration", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "HTTPS callback URL where notifications will be sent", + "pattern": "^https://", + "example": "https://client.example.com/webhooks/payment-requests" + }, + "authentication": { + "description": "Optional authentication configuration for callback requests.\nIf not provided, no authentication headers will be sent.\nHMAC authentication is recommended for production environments.\n", + "$id": "https://godaddy.com/schemas/commerce/payment-request/callback-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Callback Authentication", + "discriminator": { + "propertyName": "type", + "mapping": { + "hmac": "./HMACAuthentication.yaml", + "bearer": "./BearerTokenAuthentication.yaml", + "apikey": "./APIKeyAuthentication.yaml", + "none": "./NoAuthentication.yaml" + } + }, + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment-request/hmac-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "HMAC Authentication", + "type": "object", + "description": "HMAC authentication using shared secret for payload signing", + "properties": { + "type": { + "type": "string", + "const": "hmac", + "description": "Authentication method for callback requests" + }, + "value": { + "type": "string", + "description": "Shared secret key for payload signing.\n\nWhen using HMAC, the service sends fixed standard headers:\n- X-Signature: HMAC signature of the payload\n- X-Timestamp: Unix timestamp when request was sent\n- X-Request-Id: Unique request identifier for tracing\n", + "example": "your-shared-secret-key" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment-request/bearer-token-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bearer Token Authentication", + "type": "object", + "description": "Bearer token authentication using Authorization header", + "properties": { + "type": { + "type": "string", + "const": "bearer", + "description": "Authentication method for callback requests" + }, + "value": { + "type": "string", + "description": "Bearer token for Authorization header", + "example": "sample-jwt" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment-request/apikey-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "API Key Authentication", + "type": "object", + "description": "API key authentication using custom or default header", + "properties": { + "type": { + "type": "string", + "const": "apikey", + "description": "Authentication method for callback requests" + }, + "value": { + "type": "string", + "description": "API key value for custom header", + "example": "client-api-key-12345" + }, + "headerName": { + "type": "string", + "description": "Custom header name for API key authentication.\nDefaults to 'X-API-Key' if not specified.\n", + "example": "X-Custom-API-Key", + "default": "X-API-Key" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment-request/no-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "No Authentication", + "type": "object", + "description": "No authentication (development only)", + "properties": { + "type": { + "type": "string", + "const": "none", + "description": "Authentication method for callback requests" + } + }, + "required": [ + "type" + ] + } + ], + "examples": [ + { + "type": "hmac", + "value": "your-shared-secret-key" + }, + { + "type": "bearer", + "value": "sample-jwt" + }, + { + "type": "apikey", + "value": "client-api-key-12345" + }, + { + "type": "apikey", + "value": "client-api-key-12345", + "headerName": "X-Client-API-Key" + }, + { + "type": "none" + } + ] + }, + "payloadConfig": { + "description": "Configuration for what data to include in callback payloads", + "$id": "https://godaddy.com/schemas/commerce/payment-request/callback-payload-configuration.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Callback Payload Configuration", + "type": "object", + "properties": { + "includeFields": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "paymentRequestId", + "type", + "transactionRefNum", + "storeId", + "deviceId", + "amount", + "paymentInstructions", + "notes", + "references", + "transactionIds", + "links", + "activities", + "createdAt", + "updatedAt", + "transactions" + ] + }, + "description": "Array of field names to include in callback payload.\n\nReal Fields (PaymentRequest properties):\n- paymentRequestId, type, transactionRefNum, storeId, deviceId, amount\n- paymentInstructions, notes, references, transactionIds, links, activities\n- createdAt, updatedAt\n\nVirtual Fields (computed/expanded):\n- 'transactions': Expands transactionIds to full transaction objects (only virtual field currently supported)\n", + "minItems": 1 + }, + "legacyMode": { + "type": "boolean", + "description": "Schema version control for virtual field expansions:\n- true: Use v1 transaction schema for 'transactions' virtual field\n- false: Use v2 transaction schema for 'transactions' virtual field (default)\nOnly affects virtual fields; real PaymentRequest fields are unaffected.\n", + "default": false, + "example": false + } + }, + "required": [ + "includeFields" + ], + "examples": [ + { + "includeFields": [ + "paymentRequestId", + "type", + "amount" + ], + "legacyMode": false + }, + { + "includeFields": [ + "paymentRequestId", + "type", + "amount", + "storeId", + "transactionIds", + "activities" + ], + "legacyMode": false + }, + { + "includeFields": [ + "paymentRequestId", + "type", + "amount", + "storeId", + "transactionIds", + "transactions", + "activities" + ], + "legacyMode": false + }, + { + "includeFields": [ + "paymentRequestId", + "type", + "amount", + "transactions" + ], + "legacyMode": true + } + ] + }, + "events": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment-request/payment-request-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request Status", + "type": "string", + "enum": [ + "RECEIVED", + "QUEUED", + "IN_PROGRESS", + "FAILED", + "COMPLETED" + ], + "description": "Current status of the payment request in its lifecycle.\n\n**Status Flow:**\n- **RECEIVED**: Initial status when payment request is created\n- **QUEUED**: Payment request is queued for processing\n- **IN_PROGRESS**: Payment is being processed on the device\n- **COMPLETED**: Payment successfully processed and transactions created\n- **FAILED**: Payment failed due to error or customer cancellation\n" + }, + "description": "Array of payment request status values that should trigger callback notifications.\nEvents correspond to PaymentRequestStatus transitions.\n\nAvailable Events (from PaymentRequestStatus):\n- RECEIVED: When payment request is initially received\n- QUEUED: When payment request is queued for processing\n- IN_PROGRESS: When payment request processing begins\n- COMPLETED: When payment request processing is successfully completed\n- FAILED: When payment request processing fails\n", + "example": [ + "RECEIVED", + "COMPLETED", + "FAILED" + ] + } + }, + "required": [ + "url", + "payloadConfig" + ], + "examples": [ + { + "url": "https://client.example.com/webhooks/payment-requests", + "authentication": { + "type": "hmac", + "secret": "your-shared-secret-key" + }, + "payloadConfig": { + "includeFields": [ + "paymentRequestId", + "type", + "amount", + "storeId", + "transactions" + ], + "legacyMode": false + }, + "events": [ + "RECEIVED", + "COMPLETED", + "FAILED" + ] + }, + { + "url": "https://dev-client.example.com/webhooks", + "payloadConfig": { + "includeFields": [ + "paymentRequestId", + "type", + "amount" + ], + "legacyMode": false + }, + "events": [ + "COMPLETED" + ] + }, + { + "url": "https://legacy-client.example.com/callbacks", + "authentication": { + "type": "bearer", + "token": "legacy-bearer-token-12345" + }, + "payloadConfig": { + "includeFields": [ + "paymentRequestId", + "type", + "transactionIds", + "transactions" + ], + "legacyMode": true + }, + "events": [ + "COMPLETED", + "FAILED" + ] + } + ] + } + }, + "required": [ + "type", + "createdAt" + ] + } + }, + "responses": { + "202": { + "description": "Payment request accepted for async processing", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment-request.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request", + "type": "object", + "description": "A Payment Request represents an intent to process a payment transaction. It contains all the necessary \ninformation to initiate payment processing on a device and track the payment lifecycle from creation \nthrough completion.\n\n**Lifecycle Overview:**\n1. Created with initial status (RECEIVED/QUEUED)\n2. Sent to device for customer interaction\n3. Customer completes payment flow on device\n4. Transaction(s) created and associated with payment request\n5. Final status reached (COMPLETED/FAILED)\n\n**Key Concepts:**\n- **Async Processing**: Payment requests are processed asynchronously with status updates via callbacks\n- **Device Integration**: Payment requests are sent to physical payment devices (terminals, tablets, etc.)\n- **Activity Tracking**: All interactions and events are logged in the activities array\n- **Transaction Association**: Completed payments generate transaction records linked via transactionIds\n\n**Integration Patterns:**\n- Use callbacks for real-time status updates during async processing\n- Poll the GET endpoint if callbacks are not configured\n- Monitor activities array for detailed payment flow tracking\n- Handle race conditions gracefully (payment may complete while processing other operations)\n", + "properties": { + "paymentRequestId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true, + "example": "a1b2c3d4-e5f6-4789-9abc-def123456789" + }, + "type": { + "type": "string", + "description": "Type of payment request indicating the transaction operation (AUTHORIZE, SALE, REFUND, etc.)", + "example": "SALE" + }, + "transactionRefNum": { + "type": "string", + "format": "uuid", + "description": "Optional merchant reference number for tracking (UUID format)", + "example": "a1b2c3d4-e5f6-4789-9abc-def123456789" + }, + "originalTransactionId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "example": "b2c3d4e5-f6a7-8901-bcde-f123456789ab" + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true, + "example": "12345678-90ab-cdef-1234-567890abcdef" + }, + "deviceId": { + "type": "string", + "description": "Device identifier for this payment request (UUID or URN format)", + "example": "urn:tid:2cf6f478-e7c6-3378-8cda-74ee60715e13" + }, + "amount": null, + "paymentInstructions": { + "description": "Non-sensitive payment instructions passed to the device (e.g. skip signature, force PIN entry)", + "example": { + "skipSignature": true, + "forcePIN": false, + "tipEnabled": true, + "tipPercentage": 18, + "maxTipAmount": 100.5, + "receiptType": "email", + "timeoutSeconds": 120, + "enableContactless": true + }, + "$id": "https://godaddy.com/schemas/commerce/payment-request/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "oneOf": [ + { + "type": "string", + "maxLength": 256 + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z", + "readOnly": true + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "Updated time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z", + "readOnly": true + }, + "status": { + "description": "Current status of the payment request in its lifecycle", + "readOnly": true, + "example": "RECEIVED", + "$id": "https://godaddy.com/schemas/commerce/payment-request/payment-request-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request Status", + "type": "string", + "enum": [ + "RECEIVED", + "QUEUED", + "IN_PROGRESS", + "FAILED", + "COMPLETED" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Optional notes about the payment request", + "example": "Table 5 - Split payment with card" + }, + "references": { + "type": "array", + "items": null, + "description": "External system references for tracking", + "example": [ + { + "type": "order_id", + "value": "ORD-2024-001", + "additionalLabel": "POS Order" + }, + { + "type": "invoice_number", + "value": "INV-456789" + } + ] + }, + "transactionIds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "description": "Transaction IDs created from this payment request (populated after processing)", + "readOnly": true, + "example": [ + "11111111-2222-3333-4444-555555555555" + ] + }, + "links": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + }, + "description": "HATEOAS links for related operations" + }, + "activities": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment-request/activity.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request Activity", + "type": "object", + "description": "Activity record for a payment request", + "properties": { + "type": { + "type": "string", + "description": "Type of activity performed on the payment request", + "example": "CREATED" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the activity occurred in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "data": { + "type": "object", + "description": "Additional context data for the activity", + "additionalProperties": true, + "example": { + "userId": "user123", + "transactionId": "txn456", + "deviceId": "dev789" + } + } + }, + "required": [ + "type", + "timestamp" + ] + }, + "description": "Chronological log of all activities and events for this payment request", + "readOnly": true, + "example": [ + { + "type": "PAYMENT_REQUEST_RECEIVED", + "timestamp": "2024-01-15T10:30:00Z", + "data": { + "deviceId": "terminal-123" + } + }, + { + "type": "CUSTOMER_ENTERED_TIP", + "timestamp": "2024-01-15T10:31:15Z", + "data": { + "tipAmount": 2.5 + } + } + ] + }, + "callbackConfig": { + "description": "Optional configuration for async status notifications", + "$id": "https://godaddy.com/schemas/commerce/payment-request/callback-configuration.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Callback Configuration", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "HTTPS callback URL where notifications will be sent", + "pattern": "^https://", + "example": "https://client.example.com/webhooks/payment-requests" + }, + "authentication": { + "description": "Optional authentication configuration for callback requests.\nIf not provided, no authentication headers will be sent.\nHMAC authentication is recommended for production environments.\n", + "$id": "https://godaddy.com/schemas/commerce/payment-request/callback-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Callback Authentication", + "discriminator": { + "propertyName": "type", + "mapping": { + "hmac": "./HMACAuthentication.yaml", + "bearer": "./BearerTokenAuthentication.yaml", + "apikey": "./APIKeyAuthentication.yaml", + "none": "./NoAuthentication.yaml" + } + }, + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment-request/hmac-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "HMAC Authentication", + "type": "object", + "description": "HMAC authentication using shared secret for payload signing", + "properties": { + "type": { + "type": "string", + "const": "hmac", + "description": "Authentication method for callback requests" + }, + "value": { + "type": "string", + "description": "Shared secret key for payload signing.\n\nWhen using HMAC, the service sends fixed standard headers:\n- X-Signature: HMAC signature of the payload\n- X-Timestamp: Unix timestamp when request was sent\n- X-Request-Id: Unique request identifier for tracing\n", + "example": "your-shared-secret-key" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment-request/bearer-token-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bearer Token Authentication", + "type": "object", + "description": "Bearer token authentication using Authorization header", + "properties": { + "type": { + "type": "string", + "const": "bearer", + "description": "Authentication method for callback requests" + }, + "value": { + "type": "string", + "description": "Bearer token for Authorization header", + "example": "sample-jwt" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment-request/apikey-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "API Key Authentication", + "type": "object", + "description": "API key authentication using custom or default header", + "properties": { + "type": { + "type": "string", + "const": "apikey", + "description": "Authentication method for callback requests" + }, + "value": { + "type": "string", + "description": "API key value for custom header", + "example": "client-api-key-12345" + }, + "headerName": { + "type": "string", + "description": "Custom header name for API key authentication.\nDefaults to 'X-API-Key' if not specified.\n", + "example": "X-Custom-API-Key", + "default": "X-API-Key" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment-request/no-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "No Authentication", + "type": "object", + "description": "No authentication (development only)", + "properties": { + "type": { + "type": "string", + "const": "none", + "description": "Authentication method for callback requests" + } + }, + "required": [ + "type" + ] + } + ], + "examples": [ + { + "type": "hmac", + "value": "your-shared-secret-key" + }, + { + "type": "bearer", + "value": "sample-jwt" + }, + { + "type": "apikey", + "value": "client-api-key-12345" + }, + { + "type": "apikey", + "value": "client-api-key-12345", + "headerName": "X-Client-API-Key" + }, + { + "type": "none" + } + ] + }, + "payloadConfig": { + "description": "Configuration for what data to include in callback payloads", + "$id": "https://godaddy.com/schemas/commerce/payment-request/callback-payload-configuration.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Callback Payload Configuration", + "type": "object", + "properties": { + "includeFields": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "paymentRequestId", + "type", + "transactionRefNum", + "storeId", + "deviceId", + "amount", + "paymentInstructions", + "notes", + "references", + "transactionIds", + "links", + "activities", + "createdAt", + "updatedAt", + "transactions" + ] + }, + "description": "Array of field names to include in callback payload.\n\nReal Fields (PaymentRequest properties):\n- paymentRequestId, type, transactionRefNum, storeId, deviceId, amount\n- paymentInstructions, notes, references, transactionIds, links, activities\n- createdAt, updatedAt\n\nVirtual Fields (computed/expanded):\n- 'transactions': Expands transactionIds to full transaction objects (only virtual field currently supported)\n", + "minItems": 1 + }, + "legacyMode": { + "type": "boolean", + "description": "Schema version control for virtual field expansions:\n- true: Use v1 transaction schema for 'transactions' virtual field\n- false: Use v2 transaction schema for 'transactions' virtual field (default)\nOnly affects virtual fields; real PaymentRequest fields are unaffected.\n", + "default": false, + "example": false + } + }, + "required": [ + "includeFields" + ], + "examples": [ + { + "includeFields": [ + "paymentRequestId", + "type", + "amount" + ], + "legacyMode": false + }, + { + "includeFields": [ + "paymentRequestId", + "type", + "amount", + "storeId", + "transactionIds", + "activities" + ], + "legacyMode": false + }, + { + "includeFields": [ + "paymentRequestId", + "type", + "amount", + "storeId", + "transactionIds", + "transactions", + "activities" + ], + "legacyMode": false + }, + { + "includeFields": [ + "paymentRequestId", + "type", + "amount", + "transactions" + ], + "legacyMode": true + } + ] + }, + "events": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment-request/payment-request-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request Status", + "type": "string", + "enum": [ + "RECEIVED", + "QUEUED", + "IN_PROGRESS", + "FAILED", + "COMPLETED" + ], + "description": "Current status of the payment request in its lifecycle.\n\n**Status Flow:**\n- **RECEIVED**: Initial status when payment request is created\n- **QUEUED**: Payment request is queued for processing\n- **IN_PROGRESS**: Payment is being processed on the device\n- **COMPLETED**: Payment successfully processed and transactions created\n- **FAILED**: Payment failed due to error or customer cancellation\n" + }, + "description": "Array of payment request status values that should trigger callback notifications.\nEvents correspond to PaymentRequestStatus transitions.\n\nAvailable Events (from PaymentRequestStatus):\n- RECEIVED: When payment request is initially received\n- QUEUED: When payment request is queued for processing\n- IN_PROGRESS: When payment request processing begins\n- COMPLETED: When payment request processing is successfully completed\n- FAILED: When payment request processing fails\n", + "example": [ + "RECEIVED", + "COMPLETED", + "FAILED" + ] + } + }, + "required": [ + "url", + "payloadConfig" + ], + "examples": [ + { + "url": "https://client.example.com/webhooks/payment-requests", + "authentication": { + "type": "hmac", + "secret": "your-shared-secret-key" + }, + "payloadConfig": { + "includeFields": [ + "paymentRequestId", + "type", + "amount", + "storeId", + "transactions" + ], + "legacyMode": false + }, + "events": [ + "RECEIVED", + "COMPLETED", + "FAILED" + ] + }, + { + "url": "https://dev-client.example.com/webhooks", + "payloadConfig": { + "includeFields": [ + "paymentRequestId", + "type", + "amount" + ], + "legacyMode": false + }, + "events": [ + "COMPLETED" + ] + }, + { + "url": "https://legacy-client.example.com/callbacks", + "authentication": { + "type": "bearer", + "token": "legacy-bearer-token-12345" + }, + "payloadConfig": { + "includeFields": [ + "paymentRequestId", + "type", + "transactionIds", + "transactions" + ], + "legacyMode": true + }, + "events": [ + "COMPLETED", + "FAILED" + ] + } + ] + } + }, + "required": [ + "type", + "createdAt" + ] + } + }, + "400": { + "description": "Bad Request - Invalid input data", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "401": { + "description": "Unauthorized - Invalid authentication credentials", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "403": { + "description": "Forbidden - Insufficient permissions", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "422": { + "description": "Unprocessable Entity - Validation failed", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "429": { + "description": "Too Many Requests - Rate limit exceeded", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "default": { + "description": "Error response", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.payment-request:write" + ] + }, + { + "operationId": "getPaymentRequestById", + "method": "GET", + "path": "/stores/{storeId}/payment-requests/{paymentRequestId}", + "summary": "Get payment request by ID", + "description": "Retrieve complete information for a single payment request including:\n- Payment request details and current status\n- Amount information\n- Associated transaction IDs\n- Device and store information\n- References and metadata\n", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Unique identifier for the store", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "paymentRequestId", + "in": "path", + "required": true, + "description": "Unique identifier for the payment request", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "X-Request-Id", + "in": "header", + "required": false, + "description": "Unique request identifier for idempotency and tracing. Used to prevent duplicate payment requests.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Payment request retrieved successfully", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment-request.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request", + "type": "object", + "description": "A Payment Request represents an intent to process a payment transaction. It contains all the necessary \ninformation to initiate payment processing on a device and track the payment lifecycle from creation \nthrough completion.\n\n**Lifecycle Overview:**\n1. Created with initial status (RECEIVED/QUEUED)\n2. Sent to device for customer interaction\n3. Customer completes payment flow on device\n4. Transaction(s) created and associated with payment request\n5. Final status reached (COMPLETED/FAILED)\n\n**Key Concepts:**\n- **Async Processing**: Payment requests are processed asynchronously with status updates via callbacks\n- **Device Integration**: Payment requests are sent to physical payment devices (terminals, tablets, etc.)\n- **Activity Tracking**: All interactions and events are logged in the activities array\n- **Transaction Association**: Completed payments generate transaction records linked via transactionIds\n\n**Integration Patterns:**\n- Use callbacks for real-time status updates during async processing\n- Poll the GET endpoint if callbacks are not configured\n- Monitor activities array for detailed payment flow tracking\n- Handle race conditions gracefully (payment may complete while processing other operations)\n", + "properties": { + "paymentRequestId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true, + "example": "a1b2c3d4-e5f6-4789-9abc-def123456789" + }, + "type": { + "type": "string", + "description": "Type of payment request indicating the transaction operation (AUTHORIZE, SALE, REFUND, etc.)", + "example": "SALE" + }, + "transactionRefNum": { + "type": "string", + "format": "uuid", + "description": "Optional merchant reference number for tracking (UUID format)", + "example": "a1b2c3d4-e5f6-4789-9abc-def123456789" + }, + "originalTransactionId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "example": "b2c3d4e5-f6a7-8901-bcde-f123456789ab" + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true, + "example": "12345678-90ab-cdef-1234-567890abcdef" + }, + "deviceId": { + "type": "string", + "description": "Device identifier for this payment request (UUID or URN format)", + "example": "urn:tid:2cf6f478-e7c6-3378-8cda-74ee60715e13" + }, + "amount": null, + "paymentInstructions": { + "description": "Non-sensitive payment instructions passed to the device (e.g. skip signature, force PIN entry)", + "example": { + "skipSignature": true, + "forcePIN": false, + "tipEnabled": true, + "tipPercentage": 18, + "maxTipAmount": 100.5, + "receiptType": "email", + "timeoutSeconds": 120, + "enableContactless": true + }, + "$id": "https://godaddy.com/schemas/commerce/payment-request/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "oneOf": [ + { + "type": "string", + "maxLength": 256 + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z", + "readOnly": true + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "Updated time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z", + "readOnly": true + }, + "status": { + "description": "Current status of the payment request in its lifecycle", + "readOnly": true, + "example": "RECEIVED", + "$id": "https://godaddy.com/schemas/commerce/payment-request/payment-request-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request Status", + "type": "string", + "enum": [ + "RECEIVED", + "QUEUED", + "IN_PROGRESS", + "FAILED", + "COMPLETED" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Optional notes about the payment request", + "example": "Table 5 - Split payment with card" + }, + "references": { + "type": "array", + "items": null, + "description": "External system references for tracking", + "example": [ + { + "type": "order_id", + "value": "ORD-2024-001", + "additionalLabel": "POS Order" + }, + { + "type": "invoice_number", + "value": "INV-456789" + } + ] + }, + "transactionIds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "description": "Transaction IDs created from this payment request (populated after processing)", + "readOnly": true, + "example": [ + "11111111-2222-3333-4444-555555555555" + ] + }, + "links": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + }, + "description": "HATEOAS links for related operations" + }, + "activities": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment-request/activity.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request Activity", + "type": "object", + "description": "Activity record for a payment request", + "properties": { + "type": { + "type": "string", + "description": "Type of activity performed on the payment request", + "example": "CREATED" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the activity occurred in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "data": { + "type": "object", + "description": "Additional context data for the activity", + "additionalProperties": true, + "example": { + "userId": "user123", + "transactionId": "txn456", + "deviceId": "dev789" + } + } + }, + "required": [ + "type", + "timestamp" + ] + }, + "description": "Chronological log of all activities and events for this payment request", + "readOnly": true, + "example": [ + { + "type": "PAYMENT_REQUEST_RECEIVED", + "timestamp": "2024-01-15T10:30:00Z", + "data": { + "deviceId": "terminal-123" + } + }, + { + "type": "CUSTOMER_ENTERED_TIP", + "timestamp": "2024-01-15T10:31:15Z", + "data": { + "tipAmount": 2.5 + } + } + ] + }, + "callbackConfig": { + "description": "Optional configuration for async status notifications", + "$id": "https://godaddy.com/schemas/commerce/payment-request/callback-configuration.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Callback Configuration", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "HTTPS callback URL where notifications will be sent", + "pattern": "^https://", + "example": "https://client.example.com/webhooks/payment-requests" + }, + "authentication": { + "description": "Optional authentication configuration for callback requests.\nIf not provided, no authentication headers will be sent.\nHMAC authentication is recommended for production environments.\n", + "$id": "https://godaddy.com/schemas/commerce/payment-request/callback-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Callback Authentication", + "discriminator": { + "propertyName": "type", + "mapping": { + "hmac": "./HMACAuthentication.yaml", + "bearer": "./BearerTokenAuthentication.yaml", + "apikey": "./APIKeyAuthentication.yaml", + "none": "./NoAuthentication.yaml" + } + }, + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment-request/hmac-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "HMAC Authentication", + "type": "object", + "description": "HMAC authentication using shared secret for payload signing", + "properties": { + "type": { + "type": "string", + "const": "hmac", + "description": "Authentication method for callback requests" + }, + "value": { + "type": "string", + "description": "Shared secret key for payload signing.\n\nWhen using HMAC, the service sends fixed standard headers:\n- X-Signature: HMAC signature of the payload\n- X-Timestamp: Unix timestamp when request was sent\n- X-Request-Id: Unique request identifier for tracing\n", + "example": "your-shared-secret-key" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment-request/bearer-token-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bearer Token Authentication", + "type": "object", + "description": "Bearer token authentication using Authorization header", + "properties": { + "type": { + "type": "string", + "const": "bearer", + "description": "Authentication method for callback requests" + }, + "value": { + "type": "string", + "description": "Bearer token for Authorization header", + "example": "sample-jwt" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment-request/apikey-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "API Key Authentication", + "type": "object", + "description": "API key authentication using custom or default header", + "properties": { + "type": { + "type": "string", + "const": "apikey", + "description": "Authentication method for callback requests" + }, + "value": { + "type": "string", + "description": "API key value for custom header", + "example": "client-api-key-12345" + }, + "headerName": { + "type": "string", + "description": "Custom header name for API key authentication.\nDefaults to 'X-API-Key' if not specified.\n", + "example": "X-Custom-API-Key", + "default": "X-API-Key" + } + }, + "required": [ + "type", + "value" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment-request/no-authentication.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "No Authentication", + "type": "object", + "description": "No authentication (development only)", + "properties": { + "type": { + "type": "string", + "const": "none", + "description": "Authentication method for callback requests" + } + }, + "required": [ + "type" + ] + } + ], + "examples": [ + { + "type": "hmac", + "value": "your-shared-secret-key" + }, + { + "type": "bearer", + "value": "sample-jwt" + }, + { + "type": "apikey", + "value": "client-api-key-12345" + }, + { + "type": "apikey", + "value": "client-api-key-12345", + "headerName": "X-Client-API-Key" + }, + { + "type": "none" + } + ] + }, + "payloadConfig": { + "description": "Configuration for what data to include in callback payloads", + "$id": "https://godaddy.com/schemas/commerce/payment-request/callback-payload-configuration.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Callback Payload Configuration", + "type": "object", + "properties": { + "includeFields": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "paymentRequestId", + "type", + "transactionRefNum", + "storeId", + "deviceId", + "amount", + "paymentInstructions", + "notes", + "references", + "transactionIds", + "links", + "activities", + "createdAt", + "updatedAt", + "transactions" + ] + }, + "description": "Array of field names to include in callback payload.\n\nReal Fields (PaymentRequest properties):\n- paymentRequestId, type, transactionRefNum, storeId, deviceId, amount\n- paymentInstructions, notes, references, transactionIds, links, activities\n- createdAt, updatedAt\n\nVirtual Fields (computed/expanded):\n- 'transactions': Expands transactionIds to full transaction objects (only virtual field currently supported)\n", + "minItems": 1 + }, + "legacyMode": { + "type": "boolean", + "description": "Schema version control for virtual field expansions:\n- true: Use v1 transaction schema for 'transactions' virtual field\n- false: Use v2 transaction schema for 'transactions' virtual field (default)\nOnly affects virtual fields; real PaymentRequest fields are unaffected.\n", + "default": false, + "example": false + } + }, + "required": [ + "includeFields" + ], + "examples": [ + { + "includeFields": [ + "paymentRequestId", + "type", + "amount" + ], + "legacyMode": false + }, + { + "includeFields": [ + "paymentRequestId", + "type", + "amount", + "storeId", + "transactionIds", + "activities" + ], + "legacyMode": false + }, + { + "includeFields": [ + "paymentRequestId", + "type", + "amount", + "storeId", + "transactionIds", + "transactions", + "activities" + ], + "legacyMode": false + }, + { + "includeFields": [ + "paymentRequestId", + "type", + "amount", + "transactions" + ], + "legacyMode": true + } + ] + }, + "events": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment-request/payment-request-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request Status", + "type": "string", + "enum": [ + "RECEIVED", + "QUEUED", + "IN_PROGRESS", + "FAILED", + "COMPLETED" + ], + "description": "Current status of the payment request in its lifecycle.\n\n**Status Flow:**\n- **RECEIVED**: Initial status when payment request is created\n- **QUEUED**: Payment request is queued for processing\n- **IN_PROGRESS**: Payment is being processed on the device\n- **COMPLETED**: Payment successfully processed and transactions created\n- **FAILED**: Payment failed due to error or customer cancellation\n" + }, + "description": "Array of payment request status values that should trigger callback notifications.\nEvents correspond to PaymentRequestStatus transitions.\n\nAvailable Events (from PaymentRequestStatus):\n- RECEIVED: When payment request is initially received\n- QUEUED: When payment request is queued for processing\n- IN_PROGRESS: When payment request processing begins\n- COMPLETED: When payment request processing is successfully completed\n- FAILED: When payment request processing fails\n", + "example": [ + "RECEIVED", + "COMPLETED", + "FAILED" + ] + } + }, + "required": [ + "url", + "payloadConfig" + ], + "examples": [ + { + "url": "https://client.example.com/webhooks/payment-requests", + "authentication": { + "type": "hmac", + "secret": "your-shared-secret-key" + }, + "payloadConfig": { + "includeFields": [ + "paymentRequestId", + "type", + "amount", + "storeId", + "transactions" + ], + "legacyMode": false + }, + "events": [ + "RECEIVED", + "COMPLETED", + "FAILED" + ] + }, + { + "url": "https://dev-client.example.com/webhooks", + "payloadConfig": { + "includeFields": [ + "paymentRequestId", + "type", + "amount" + ], + "legacyMode": false + }, + "events": [ + "COMPLETED" + ] + }, + { + "url": "https://legacy-client.example.com/callbacks", + "authentication": { + "type": "bearer", + "token": "legacy-bearer-token-12345" + }, + "payloadConfig": { + "includeFields": [ + "paymentRequestId", + "type", + "transactionIds", + "transactions" + ], + "legacyMode": true + }, + "events": [ + "COMPLETED", + "FAILED" + ] + } + ] + } + }, + "required": [ + "type", + "createdAt" + ] + } + }, + "400": { + "description": "Bad Request - Invalid input data", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "401": { + "description": "Unauthorized - Invalid authentication credentials", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "403": { + "description": "Forbidden - Insufficient permissions", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Not Found - Resource does not exist", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "429": { + "description": "Too Many Requests - Rate limit exceeded", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "default": { + "description": "Error response", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.payment-request:read" + ] + }, + { + "operationId": "addPaymentRequestActivity", + "method": "POST", + "path": "/stores/{storeId}/payment-requests/{paymentRequestId}/activities", + "summary": "Add activity to payment request", + "description": "Add a new activity entry to a payment request for tracking customer and device interactions.\n\n**Common Use Cases:**\n- Device events: \"PAYMENT_REQUEST_RECEIVED\", \"PAYMENT_POPUP_DISPLAYED\", \"CARD_READER_ACTIVATED\"\n- Customer interactions: \"CUSTOMER_ENTERED_TIP\", \"PIN_ENTRY_STARTED\", \"SIGNATURE_REQUESTED\"\n- Transaction flow: \"CUSTOMER_APPROVED_AMOUNT\", \"CUSTOMER_CANCELLED_TRANSACTION\", \"PAYMENT_METHOD_SELECTED\"\n- Processing events: \"SENT_TO_PROCESSOR\", \"AUTHORIZATION_RECEIVED\", \"RECEIPT_PRINTED\"\n\n**Required Properties:**\n- `type` - Activity type identifier (e.g., \"CUSTOMER_ENTERED_TIP\")\n- `timestamp` - When the activity occurred (ISO 8601 format)\n\n**Optional Properties:**\n- `data` - Additional context data (e.g., tip amount, card type, error details)\n\n**Notes:**\n- Activities are append-only and cannot be modified once created\n- Use the actual occurrence time, not when you're logging the activity\n- Maintain consistent activity type naming across your integration\n", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Unique identifier for the store", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "paymentRequestId", + "in": "path", + "required": true, + "description": "Unique identifier for the payment request", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "X-Request-Id", + "in": "header", + "required": false, + "description": "Unique request identifier for idempotency and tracing. Used to prevent duplicate payment requests.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment-request/activity.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request Activity", + "type": "object", + "description": "Activity record for a payment request", + "properties": { + "type": { + "type": "string", + "description": "Type of activity performed on the payment request", + "example": "CREATED" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the activity occurred in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "data": { + "type": "object", + "description": "Additional context data for the activity", + "additionalProperties": true, + "example": { + "userId": "user123", + "transactionId": "txn456", + "deviceId": "dev789" + } + } + }, + "required": [ + "type", + "timestamp" + ] + } + }, + "responses": { + "201": { + "description": "Payment request activity created successfully", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment-request/activity.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request Activity", + "type": "object", + "description": "Activity record for a payment request", + "properties": { + "type": { + "type": "string", + "description": "Type of activity performed on the payment request", + "example": "CREATED" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the activity occurred in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "data": { + "type": "object", + "description": "Additional context data for the activity", + "additionalProperties": true, + "example": { + "userId": "user123", + "transactionId": "txn456", + "deviceId": "dev789" + } + } + }, + "required": [ + "type", + "timestamp" + ] + } + }, + "400": { + "description": "Bad Request - Invalid input data", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "401": { + "description": "Unauthorized - Invalid authentication credentials", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "403": { + "description": "Forbidden - Insufficient permissions", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Not Found - Resource does not exist", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "422": { + "description": "Unprocessable Entity - Validation failed", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "429": { + "description": "Too Many Requests - Rate limit exceeded", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "default": { + "description": "Error response", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.payment-request:write" + ] + }, + { + "operationId": "getPaymentRequestActivities", + "method": "GET", + "path": "/stores/{storeId}/payment-requests/{paymentRequestId}/activities", + "summary": "Get all activities for a payment request", + "description": "Retrieve all activities for a specific payment request in chronological order.\n\n**Use Cases:**\n- View complete payment flow history\n- Debug payment processing issues\n- Audit customer interactions and device events\n- Analyze payment request lifecycle and timing\n\n**Filtering Options:**\n- Filter by activity type(s) to focus on specific events\n- Filter by time range to analyze specific periods\n- Use pagination for large activity logs\n\n**Response Details:**\n- Activities are returned in chronological order (oldest first)\n- Each activity includes type, timestamp, and optional data\n- Pagination is supported for large result sets\n\n**Note:** Activities are immutable - this endpoint is read-only.\n", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Unique identifier for the store", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "paymentRequestId", + "in": "path", + "required": true, + "description": "Unique identifier for the payment request", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "X-Request-Id", + "in": "header", + "required": false, + "description": "Unique request identifier for idempotency and tracing. Used to prevent duplicate payment requests.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "Page number (1-indexed)", + "schema": { + "type": "integer", + "default": 1, + "minimum": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "Number of items per page", + "schema": { + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "activityType", + "in": "query", + "required": false, + "description": "Filter by activity type", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "startTime", + "in": "query", + "required": false, + "description": "Filter activities after this time (ISO 8601 format)", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "endTime", + "in": "query", + "required": false, + "description": "Filter activities before this time (ISO 8601 format)", + "schema": { + "type": "string", + "format": "date-time" + } + } + ], + "responses": { + "200": { + "description": "Payment request activities retrieved successfully", + "schema": { + "title": "PaymentRequestActivities", + "allOf": [ + { + "type": "object", + "properties": { + "currentPage": { + "type": "integer", + "description": "Current page number" + }, + "pageSize": { + "type": "integer", + "description": "Number of items per page" + }, + "pageToken": { + "type": "string", + "description": "Token for retrieving the next page of results. Use this value in the pageToken query parameter for the next request." + }, + "links": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } + } + ], + "properties": { + "items": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment-request/activity.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Request Activity", + "type": "object", + "description": "Activity record for a payment request", + "properties": { + "type": { + "type": "string", + "description": "Type of activity performed on the payment request", + "example": "CREATED" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the activity occurred in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "data": { + "type": "object", + "description": "Additional context data for the activity", + "additionalProperties": true, + "example": { + "userId": "user123", + "transactionId": "txn456", + "deviceId": "dev789" + } + } + }, + "required": [ + "type", + "timestamp" + ] + } + } + } + } + }, + "400": { + "description": "Bad Request - Invalid input data", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "401": { + "description": "Unauthorized - Invalid authentication credentials", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "403": { + "description": "Forbidden - Insufficient permissions", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Not Found - Resource does not exist", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "429": { + "description": "Too Many Requests - Rate limit exceeded", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "default": { + "description": "Error response", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.payment-request:read" + ] + } + ] +} \ No newline at end of file diff --git a/src/cli/schemas/api/payments.json b/src/cli/schemas/api/payments.json new file mode 100644 index 0000000..16c421c --- /dev/null +++ b/src/cli/schemas/api/payments.json @@ -0,0 +1,49529 @@ +{ + "name": "payments", + "title": "Payments API", + "description": "", + "version": "1.0.0", + "baseUrl": "https://api.godaddy.com/v1/commerce", + "endpoints": [ + { + "operationId": "getAuthorizations", + "method": "GET", + "path": "/stores/{storeId}/payments/{paymentId}/authorizations", + "summary": "Get Authorizations", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "totalRequired", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Authorization list", + "schema": { + "title": "Authorizations", + "allOf": [ + { + "properties": { + "totalItems": { + "type": "integer" + }, + "totalPages": { + "type": "integer" + }, + "links": { + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "description": "HATEOAS links", + "type": "array", + "x-auto-generated": true, + "definitions": { + "Link": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + }, + "items": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + } + } + ], + "properties": { + "items": { + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/authorization.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Authorization Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents authorization transaction against a payment" + }, + "type": "array" + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "voidAuthorizationByRefNum", + "method": "DELETE", + "path": "/stores/{storeId}/payments/{paymentId}/authorizations/{transactionRefNum}", + "summary": "Void Authorization", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionRefNum", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "getAuthorizationById", + "method": "GET", + "path": "/stores/{storeId}/payments/{paymentId}/authorizations/{transactionId}", + "summary": "Get Authorization", + "description": "Retrieve the information of the authorization by the transaction ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Authorization Found", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/authorization.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Authorization Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents authorization transaction against a payment" + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "updateAuthorizationById", + "method": "PATCH", + "path": "/stores/{storeId}/payments/{paymentId}/authorizations/{transactionId}", + "summary": "Update authorization", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "contentType": "application/merge-patch+json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/patch-transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Patch Transaction", + "type": "object", + "description": "Patch transaction", + "properties": { + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + } + } + }, + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "voidAuthorizationById", + "method": "DELETE", + "path": "/stores/{storeId}/payments/{paymentId}/authorizations/{transactionId}", + "summary": "Void Authorization", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "addAuthorizationSignatureByTransactionId", + "method": "POST", + "path": "/stores/{storeId}/payments/{paymentId}/authorizations/{transactionId}/signatures", + "summary": "Add Authorization Signature", + "description": "Add authorization signature by the transaction ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "contentType": "multipart/form-data", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/signature.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Customer Signature", + "type": "object", + "properties": { + "signature": { + "type": "string", + "format": "binary", + "writeOnly": true, + "description": "Signature data in Binary format" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "signatureUrl": { + "type": "string", + "format": "uri", + "readOnly": true, + "description": "URL of the image uploaded" + }, + "id": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + } + } + }, + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "getAuthorizationSignaturesById", + "method": "GET", + "path": "/stores/{storeId}/payments/{paymentId}/authorizations/{transactionId}/signatures", + "summary": "Get Authorization Signatures", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "totalRequired", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Authorization Signature list", + "schema": { + "title": "Authorization Signatures", + "allOf": [ + { + "properties": { + "totalItems": { + "type": "integer" + }, + "totalPages": { + "type": "integer" + }, + "links": { + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "description": "HATEOAS links", + "type": "array", + "x-auto-generated": true, + "definitions": { + "Link": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + }, + "items": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + } + } + ], + "properties": { + "items": { + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/signature.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Customer Signature", + "type": "object", + "properties": { + "signature": { + "type": "string", + "format": "binary", + "writeOnly": true, + "description": "Signature data in Binary format" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "signatureUrl": { + "type": "string", + "format": "uri", + "readOnly": true, + "description": "URL of the image uploaded" + }, + "id": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + } + }, + "type": "array" + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "capturePayment", + "method": "POST", + "path": "/stores/{storeId}/payments/{paymentId}/captures", + "summary": "Capture Payment", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/capture.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Capture Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents capture transaction against a payment", + "properties": { + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + } + }, + "responses": { + "201": { + "description": "Capture payment completed successfully", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/capture.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Capture Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents capture transaction against a payment", + "properties": { + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + } + } + }, + "scopes": [] + }, + { + "operationId": "getCaptures", + "method": "GET", + "path": "/stores/{storeId}/payments/{paymentId}/captures", + "summary": "Get Captures", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "totalRequired", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Capture list", + "schema": { + "title": "Captures", + "allOf": [ + { + "properties": { + "totalItems": { + "type": "integer" + }, + "totalPages": { + "type": "integer" + }, + "links": { + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "description": "HATEOAS links", + "type": "array", + "x-auto-generated": true, + "definitions": { + "Link": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + }, + "items": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + } + } + ], + "properties": { + "items": { + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/capture.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Capture Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents capture transaction against a payment", + "properties": { + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + }, + "type": "array" + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "voidCaptureByRefNum", + "method": "DELETE", + "path": "/stores/{storeId}/payments/{paymentId}/captures/{transactionRefNum}", + "summary": "Void Capture", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionRefNum", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "getCaptureById", + "method": "GET", + "path": "/stores/{storeId}/payments/{paymentId}/captures/{transactionId}", + "summary": "Get Capture", + "description": "Retrieve the information of the capture by the transaction ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Capture Found", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/capture.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Capture Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents capture transaction against a payment", + "properties": { + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "voidCaptureById", + "method": "DELETE", + "path": "/stores/{storeId}/payments/{paymentId}/captures/{transactionId}", + "summary": "Void Capture", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "getSales", + "method": "GET", + "path": "/stores/{storeId}/payments/{paymentId}/sales", + "summary": "Get Sales", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "totalRequired", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Sale list", + "schema": { + "title": "Sales", + "allOf": [ + { + "properties": { + "totalItems": { + "type": "integer" + }, + "totalPages": { + "type": "integer" + }, + "links": { + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "description": "HATEOAS links", + "type": "array", + "x-auto-generated": true, + "definitions": { + "Link": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + }, + "items": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + } + } + ], + "properties": { + "items": { + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/sale.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Sale Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents sale transaction against a payment" + }, + "type": "array" + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "voidSaleByRefNum", + "method": "DELETE", + "path": "/stores/{storeId}/payments/{paymentId}/sales/{transactionRefNum}", + "summary": "Void Sale", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionRefNum", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "getSaleById", + "method": "GET", + "path": "/stores/{storeId}/payments/{paymentId}/sales/{transactionId}", + "summary": "Get Sale", + "description": "Retrieve the information of the sale by the transaction ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Sale Found", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/sale.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Sale Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents sale transaction against a payment" + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "updateSaleById", + "method": "PATCH", + "path": "/stores/{storeId}/payments/{paymentId}/sales/{transactionId}", + "summary": "Update Sale", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "contentType": "application/merge-patch+json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/patch-transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Patch Transaction", + "type": "object", + "description": "Patch transaction", + "properties": { + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + } + } + }, + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "voidSaleById", + "method": "DELETE", + "path": "/stores/{storeId}/payments/{paymentId}/sales/{transactionId}", + "summary": "Void Sale", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "addSaleSignatureByTransactionId", + "method": "POST", + "path": "/stores/{storeId}/payments/{paymentId}/sales/{transactionId}/signatures", + "summary": "Add Sale Signature", + "description": "Add sale signature by the transaction ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "contentType": "multipart/form-data", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/signature.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Customer Signature", + "type": "object", + "properties": { + "signature": { + "type": "string", + "format": "binary", + "writeOnly": true, + "description": "Signature data in Binary format" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "signatureUrl": { + "type": "string", + "format": "uri", + "readOnly": true, + "description": "URL of the image uploaded" + }, + "id": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + } + } + }, + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "getSaleSignaturesById", + "method": "GET", + "path": "/stores/{storeId}/payments/{paymentId}/sales/{transactionId}/signatures", + "summary": "Get Sale Signatures", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "totalRequired", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Sale Signature list", + "schema": { + "title": "Sale Signatures", + "allOf": [ + { + "properties": { + "totalItems": { + "type": "integer" + }, + "totalPages": { + "type": "integer" + }, + "links": { + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "description": "HATEOAS links", + "type": "array", + "x-auto-generated": true, + "definitions": { + "Link": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + }, + "items": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + } + } + ], + "properties": { + "items": { + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/signature.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Customer Signature", + "type": "object", + "properties": { + "signature": { + "type": "string", + "format": "binary", + "writeOnly": true, + "description": "Signature data in Binary format" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "signatureUrl": { + "type": "string", + "format": "uri", + "readOnly": true, + "description": "URL of the image uploaded" + }, + "id": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + } + }, + "type": "array" + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "adjustPayment", + "method": "POST", + "path": "/stores/{storeId}/payments/{paymentId}/adjustments", + "summary": "Adjust Payment", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Adjustment Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents Adjustment transaction against a payment", + "properties": { + "newAmount": { + "description": "Adjusted transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + } + }, + "required": [ + "newAmount" + ] + } + }, + "responses": { + "201": { + "description": "Adjust payment completed successfully", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Adjustment Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents Adjustment transaction against a payment", + "properties": { + "newAmount": { + "description": "Adjusted transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + } + }, + "required": [ + "newAmount" + ] + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "getAdjustments", + "method": "GET", + "path": "/stores/{storeId}/payments/{paymentId}/adjustments", + "summary": "Get Adjustments", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "totalRequired", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Adjustment list", + "schema": { + "title": "Adjustments", + "allOf": [ + { + "properties": { + "totalItems": { + "type": "integer" + }, + "totalPages": { + "type": "integer" + }, + "links": { + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "description": "HATEOAS links", + "type": "array", + "x-auto-generated": true, + "definitions": { + "Link": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + }, + "items": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + } + } + ], + "properties": { + "items": { + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Adjustment Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents Adjustment transaction against a payment", + "properties": { + "newAmount": { + "description": "Adjusted transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + } + }, + "required": [ + "newAmount" + ] + }, + "type": "array" + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "voidAdjustmentByRefNum", + "method": "DELETE", + "path": "/stores/{storeId}/payments/{paymentId}/adjustments/{transactionRefNum}", + "summary": "Void Adjustment", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionRefNum", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "getAdjustmentById", + "method": "GET", + "path": "/stores/{storeId}/payments/{paymentId}/adjustments/{transactionId}", + "summary": "Get Adjustment", + "description": "Retrieve the information of the adjustment by the transaction ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Adjustment Found", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Adjustment Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents Adjustment transaction against a payment", + "properties": { + "newAmount": { + "description": "Adjusted transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + } + }, + "required": [ + "newAmount" + ] + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "updateAdjustmentById", + "method": "PATCH", + "path": "/stores/{storeId}/payments/{paymentId}/adjustments/{transactionId}", + "summary": "Update Adjustment", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "contentType": "application/merge-patch+json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/patch-transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Patch Transaction", + "type": "object", + "description": "Patch transaction", + "properties": { + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + } + } + }, + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "voidAdjustmentById", + "method": "DELETE", + "path": "/stores/{storeId}/payments/{paymentId}/adjustments/{transactionId}", + "summary": "Void Adjustment", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "addAdjustmentSignatureByTransactionId", + "method": "POST", + "path": "/stores/{storeId}/payments/{paymentId}/adjustments/{transactionId}/signatures", + "summary": "Add Adjustment Signature", + "description": "Add adjustment signature by the transaction ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "contentType": "multipart/form-data", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/signature.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Customer Signature", + "type": "object", + "properties": { + "signature": { + "type": "string", + "format": "binary", + "writeOnly": true, + "description": "Signature data in Binary format" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "signatureUrl": { + "type": "string", + "format": "uri", + "readOnly": true, + "description": "URL of the image uploaded" + }, + "id": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + } + } + }, + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "getAdjustmentSignaturesById", + "method": "GET", + "path": "/stores/{storeId}/payments/{paymentId}/adjustments/{transactionId}/signatures", + "summary": "Get Adjustment Signatures", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "totalRequired", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Adjustment Signature list", + "schema": { + "title": "Adjustment Signatures", + "allOf": [ + { + "properties": { + "totalItems": { + "type": "integer" + }, + "totalPages": { + "type": "integer" + }, + "links": { + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "description": "HATEOAS links", + "type": "array", + "x-auto-generated": true, + "definitions": { + "Link": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + }, + "items": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + } + } + ], + "properties": { + "items": { + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/signature.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Customer Signature", + "type": "object", + "properties": { + "signature": { + "type": "string", + "format": "binary", + "writeOnly": true, + "description": "Signature data in Binary format" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "signatureUrl": { + "type": "string", + "format": "uri", + "readOnly": true, + "description": "URL of the image uploaded" + }, + "id": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + } + }, + "type": "array" + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "refundPayment", + "method": "POST", + "path": "/stores/{storeId}/payments/{paymentId}/refunds", + "summary": "Refund Payment", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/refund.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Refund Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents refund transaction against a payment", + "properties": { + "alternateFundingSource": { + "description": "Alternate funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Funding Source", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Card", + "type": "object", + "properties": { + "cardDetail": { + "description": "Card detail", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "writeOnly": true, + "description": "Verification data that can be used to verify the customer information", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "processingInstruction": { + "writeOnly": true, + "description": "Processing instruction to use this funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/card-processing-instruction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processing Instruction", + "type": "object", + "properties": { + "signatureRequired": { + "type": "boolean", + "default": false, + "description": "If signature is required for this transaction" + }, + "debit": { + "type": "boolean", + "default": false, + "description": "If card should be processed as debit or not" + } + } + } + }, + "required": [ + "cardDetail" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/ebt-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "EBT Card", + "type": "object", + "properties": { + "cardDetail": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "cardType": { + "type": "string", + "enum": [ + "FOOD_STAMP", + "CASH_BENEFIT", + "ELECTRONIC_VOUCHER" + ] + }, + "eVoucherSerial": { + "type": "string" + }, + "eVoucherApprovalCode": { + "type": "string" + } + }, + "required": [ + "cardDetail", + "cardType" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/gdpayment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GoDaddy PaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Godaddy Payment token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/applepay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ApplePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Apple pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/google-pay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GooglePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Google pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/paypal-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaypalPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Paypal token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + } + ], + "discriminator": { + "propertyName": "sourceType", + "mapping": { + "PAYMENT_CARD": "./PaymentCard.yaml", + "EBT_CARD": "./EBTCard.yaml", + "GODADDY": "../payment-token/GDPaymentTokenReference.yaml", + "APPLE_PAY": "../payment-token/ApplePayPaymentToken.yaml", + "GOOGLE_PAY": "../payment-token/GooglePayPaymentToken.yaml", + "PAYPAL": "../payment-token/PaypalPaymentToken.yaml" + } + }, + "properties": { + "sourceType": { + "type": "string", + "description": "Discriminator field representing the type of Funding source" + } + }, + "required": [ + "sourceType" + ] + }, + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + } + }, + "responses": { + "201": { + "description": "Refund payment completed successfully", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/refund.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Refund Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents refund transaction against a payment", + "properties": { + "alternateFundingSource": { + "description": "Alternate funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Funding Source", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Card", + "type": "object", + "properties": { + "cardDetail": { + "description": "Card detail", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "writeOnly": true, + "description": "Verification data that can be used to verify the customer information", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "processingInstruction": { + "writeOnly": true, + "description": "Processing instruction to use this funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/card-processing-instruction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processing Instruction", + "type": "object", + "properties": { + "signatureRequired": { + "type": "boolean", + "default": false, + "description": "If signature is required for this transaction" + }, + "debit": { + "type": "boolean", + "default": false, + "description": "If card should be processed as debit or not" + } + } + } + }, + "required": [ + "cardDetail" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/ebt-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "EBT Card", + "type": "object", + "properties": { + "cardDetail": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "cardType": { + "type": "string", + "enum": [ + "FOOD_STAMP", + "CASH_BENEFIT", + "ELECTRONIC_VOUCHER" + ] + }, + "eVoucherSerial": { + "type": "string" + }, + "eVoucherApprovalCode": { + "type": "string" + } + }, + "required": [ + "cardDetail", + "cardType" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/gdpayment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GoDaddy PaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Godaddy Payment token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/applepay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ApplePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Apple pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/google-pay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GooglePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Google pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/paypal-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaypalPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Paypal token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + } + ], + "discriminator": { + "propertyName": "sourceType", + "mapping": { + "PAYMENT_CARD": "./PaymentCard.yaml", + "EBT_CARD": "./EBTCard.yaml", + "GODADDY": "../payment-token/GDPaymentTokenReference.yaml", + "APPLE_PAY": "../payment-token/ApplePayPaymentToken.yaml", + "GOOGLE_PAY": "../payment-token/GooglePayPaymentToken.yaml", + "PAYPAL": "../payment-token/PaypalPaymentToken.yaml" + } + }, + "properties": { + "sourceType": { + "type": "string", + "description": "Discriminator field representing the type of Funding source" + } + }, + "required": [ + "sourceType" + ] + }, + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "getRefunds", + "method": "GET", + "path": "/stores/{storeId}/payments/{paymentId}/refunds", + "summary": "Get Refunds", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "totalRequired", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Refund list", + "schema": { + "title": "Refunds", + "allOf": [ + { + "properties": { + "totalItems": { + "type": "integer" + }, + "totalPages": { + "type": "integer" + }, + "links": { + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "description": "HATEOAS links", + "type": "array", + "x-auto-generated": true, + "definitions": { + "Link": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + }, + "items": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + } + } + ], + "properties": { + "items": { + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/refund.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Refund Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents refund transaction against a payment", + "properties": { + "alternateFundingSource": { + "description": "Alternate funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Funding Source", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Card", + "type": "object", + "properties": { + "cardDetail": { + "description": "Card detail", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "writeOnly": true, + "description": "Verification data that can be used to verify the customer information", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "processingInstruction": { + "writeOnly": true, + "description": "Processing instruction to use this funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/card-processing-instruction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processing Instruction", + "type": "object", + "properties": { + "signatureRequired": { + "type": "boolean", + "default": false, + "description": "If signature is required for this transaction" + }, + "debit": { + "type": "boolean", + "default": false, + "description": "If card should be processed as debit or not" + } + } + } + }, + "required": [ + "cardDetail" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/ebt-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "EBT Card", + "type": "object", + "properties": { + "cardDetail": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "cardType": { + "type": "string", + "enum": [ + "FOOD_STAMP", + "CASH_BENEFIT", + "ELECTRONIC_VOUCHER" + ] + }, + "eVoucherSerial": { + "type": "string" + }, + "eVoucherApprovalCode": { + "type": "string" + } + }, + "required": [ + "cardDetail", + "cardType" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/gdpayment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GoDaddy PaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Godaddy Payment token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/applepay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ApplePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Apple pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/google-pay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GooglePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Google pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/paypal-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaypalPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Paypal token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + } + ], + "discriminator": { + "propertyName": "sourceType", + "mapping": { + "PAYMENT_CARD": "./PaymentCard.yaml", + "EBT_CARD": "./EBTCard.yaml", + "GODADDY": "../payment-token/GDPaymentTokenReference.yaml", + "APPLE_PAY": "../payment-token/ApplePayPaymentToken.yaml", + "GOOGLE_PAY": "../payment-token/GooglePayPaymentToken.yaml", + "PAYPAL": "../payment-token/PaypalPaymentToken.yaml" + } + }, + "properties": { + "sourceType": { + "type": "string", + "description": "Discriminator field representing the type of Funding source" + } + }, + "required": [ + "sourceType" + ] + }, + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + }, + "type": "array" + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "voidRefundByRefNum", + "method": "DELETE", + "path": "/stores/{storeId}/payments/{paymentId}/refunds/{transactionRefNum}", + "summary": "Void Refund", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionRefNum", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "getRefundById", + "method": "GET", + "path": "/stores/{storeId}/payments/{paymentId}/refunds/{transactionId}", + "summary": "Get Refund", + "description": "Retrieve the information of the refund by the transaction ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Refund Found", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/refund.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Refund Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents refund transaction against a payment", + "properties": { + "alternateFundingSource": { + "description": "Alternate funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Funding Source", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Card", + "type": "object", + "properties": { + "cardDetail": { + "description": "Card detail", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "writeOnly": true, + "description": "Verification data that can be used to verify the customer information", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "processingInstruction": { + "writeOnly": true, + "description": "Processing instruction to use this funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/card-processing-instruction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processing Instruction", + "type": "object", + "properties": { + "signatureRequired": { + "type": "boolean", + "default": false, + "description": "If signature is required for this transaction" + }, + "debit": { + "type": "boolean", + "default": false, + "description": "If card should be processed as debit or not" + } + } + } + }, + "required": [ + "cardDetail" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/ebt-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "EBT Card", + "type": "object", + "properties": { + "cardDetail": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "cardType": { + "type": "string", + "enum": [ + "FOOD_STAMP", + "CASH_BENEFIT", + "ELECTRONIC_VOUCHER" + ] + }, + "eVoucherSerial": { + "type": "string" + }, + "eVoucherApprovalCode": { + "type": "string" + } + }, + "required": [ + "cardDetail", + "cardType" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/gdpayment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GoDaddy PaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Godaddy Payment token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/applepay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ApplePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Apple pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/google-pay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GooglePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Google pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/paypal-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaypalPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Paypal token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + } + ], + "discriminator": { + "propertyName": "sourceType", + "mapping": { + "PAYMENT_CARD": "./PaymentCard.yaml", + "EBT_CARD": "./EBTCard.yaml", + "GODADDY": "../payment-token/GDPaymentTokenReference.yaml", + "APPLE_PAY": "../payment-token/ApplePayPaymentToken.yaml", + "GOOGLE_PAY": "../payment-token/GooglePayPaymentToken.yaml", + "PAYPAL": "../payment-token/PaypalPaymentToken.yaml" + } + }, + "properties": { + "sourceType": { + "type": "string", + "description": "Discriminator field representing the type of Funding source" + } + }, + "required": [ + "sourceType" + ] + }, + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "updateRefundById", + "method": "PATCH", + "path": "/stores/{storeId}/payments/{paymentId}/refunds/{transactionId}", + "summary": "Update Refund", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "contentType": "application/merge-patch+json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/patch-transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Patch Transaction", + "type": "object", + "description": "Patch transaction", + "properties": { + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + } + } + }, + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "voidRefundById", + "method": "DELETE", + "path": "/stores/{storeId}/payments/{paymentId}/refunds/{transactionId}", + "summary": "Void Refund", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "addRefundSignatureByTransactionId", + "method": "POST", + "path": "/stores/{storeId}/payments/{paymentId}/refunds/{transactionId}/signatures", + "summary": "Add Refund Signature", + "description": "Add refund signature by the transaction ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "contentType": "multipart/form-data", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/signature.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Customer Signature", + "type": "object", + "properties": { + "signature": { + "type": "string", + "format": "binary", + "writeOnly": true, + "description": "Signature data in Binary format" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "signatureUrl": { + "type": "string", + "format": "uri", + "readOnly": true, + "description": "URL of the image uploaded" + }, + "id": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + } + } + }, + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "getRefundSignaturesById", + "method": "GET", + "path": "/stores/{storeId}/payments/{paymentId}/refunds/{transactionId}/signatures", + "summary": "Get Refund Signatures", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "Request Id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "totalRequired", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Refund Signature list", + "schema": { + "title": "Refund Signatures", + "allOf": [ + { + "properties": { + "totalItems": { + "type": "integer" + }, + "totalPages": { + "type": "integer" + }, + "links": { + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "description": "HATEOAS links", + "type": "array", + "x-auto-generated": true, + "definitions": { + "Link": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + }, + "items": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + } + } + ], + "properties": { + "items": { + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/signature.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Customer Signature", + "type": "object", + "properties": { + "signature": { + "type": "string", + "format": "binary", + "writeOnly": true, + "description": "Signature data in Binary format" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "signatureUrl": { + "type": "string", + "format": "uri", + "readOnly": true, + "description": "URL of the image uploaded" + }, + "id": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + } + }, + "type": "array" + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "createPayment", + "method": "POST", + "path": "/stores/{storeId}/payments", + "summary": "Create Payment", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + } + ], + "requestBody": { + "required": false, + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment", + "type": "object", + "x-tags": [ + "transaction", + "payments" + ], + "x-generic-type": "Payment", + "description": "A monetary transfer of funds from a funding source to the recipient merchant", + "properties": { + "id": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "refNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "type": { + "$id": "https://godaddy.com/schemas/commerce/payment/type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Type", + "type": "string", + "enum": [ + "AUTHORIZATION", + "SALE", + "REFUND" + ], + "description": "Payment type" + }, + "amount": { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ], + "description": "Payment amount requested" + }, + "netAmount": { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ], + "description": "Current net payment amount" + }, + "fundingSource": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Funding Source", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Card", + "type": "object", + "properties": { + "cardDetail": { + "description": "Card detail", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "writeOnly": true, + "description": "Verification data that can be used to verify the customer information", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "processingInstruction": { + "writeOnly": true, + "description": "Processing instruction to use this funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/card-processing-instruction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processing Instruction", + "type": "object", + "properties": { + "signatureRequired": { + "type": "boolean", + "default": false, + "description": "If signature is required for this transaction" + }, + "debit": { + "type": "boolean", + "default": false, + "description": "If card should be processed as debit or not" + } + } + } + }, + "required": [ + "cardDetail" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/ebt-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "EBT Card", + "type": "object", + "properties": { + "cardDetail": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "cardType": { + "type": "string", + "enum": [ + "FOOD_STAMP", + "CASH_BENEFIT", + "ELECTRONIC_VOUCHER" + ] + }, + "eVoucherSerial": { + "type": "string" + }, + "eVoucherApprovalCode": { + "type": "string" + } + }, + "required": [ + "cardDetail", + "cardType" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/gdpayment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GoDaddy PaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Godaddy Payment token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/applepay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ApplePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Apple pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/google-pay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GooglePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Google pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/paypal-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaypalPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Paypal token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + } + ], + "discriminator": { + "propertyName": "sourceType", + "mapping": { + "PAYMENT_CARD": "./PaymentCard.yaml", + "EBT_CARD": "./EBTCard.yaml", + "GODADDY": "../payment-token/GDPaymentTokenReference.yaml", + "APPLE_PAY": "../payment-token/ApplePayPaymentToken.yaml", + "GOOGLE_PAY": "../payment-token/GooglePayPaymentToken.yaml", + "PAYPAL": "../payment-token/PaypalPaymentToken.yaml" + } + }, + "properties": { + "sourceType": { + "type": "string", + "description": "Discriminator field representing the type of Funding source" + } + }, + "required": [ + "sourceType" + ] + }, + "paymentContext": { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "authorizations": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/authorization.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Authorization Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents authorization transaction against a payment" + }, + "readOnly": true, + "description": "Authorizations for the payment" + }, + "adjustments": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Adjustment Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents Adjustment transaction against a payment", + "properties": { + "newAmount": { + "description": "Adjusted transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + } + }, + "required": [ + "newAmount" + ] + }, + "readOnly": true, + "description": "Adjustments for the payment" + }, + "captures": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/capture.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Capture Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents capture transaction against a payment", + "properties": { + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + }, + "readOnly": true, + "description": "Captures for the payment" + }, + "sales": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/sale.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Sale Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents sale transaction against a payment" + }, + "readOnly": true, + "description": "Sales for the payment" + }, + "refunds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/refund.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Refund Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents refund transaction against a payment", + "properties": { + "alternateFundingSource": { + "description": "Alternate funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Funding Source", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Card", + "type": "object", + "properties": { + "cardDetail": { + "description": "Card detail", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "writeOnly": true, + "description": "Verification data that can be used to verify the customer information", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "processingInstruction": { + "writeOnly": true, + "description": "Processing instruction to use this funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/card-processing-instruction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processing Instruction", + "type": "object", + "properties": { + "signatureRequired": { + "type": "boolean", + "default": false, + "description": "If signature is required for this transaction" + }, + "debit": { + "type": "boolean", + "default": false, + "description": "If card should be processed as debit or not" + } + } + } + }, + "required": [ + "cardDetail" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/ebt-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "EBT Card", + "type": "object", + "properties": { + "cardDetail": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "cardType": { + "type": "string", + "enum": [ + "FOOD_STAMP", + "CASH_BENEFIT", + "ELECTRONIC_VOUCHER" + ] + }, + "eVoucherSerial": { + "type": "string" + }, + "eVoucherApprovalCode": { + "type": "string" + } + }, + "required": [ + "cardDetail", + "cardType" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/gdpayment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GoDaddy PaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Godaddy Payment token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/applepay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ApplePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Apple pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/google-pay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GooglePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Google pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/paypal-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaypalPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Paypal token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + } + ], + "discriminator": { + "propertyName": "sourceType", + "mapping": { + "PAYMENT_CARD": "./PaymentCard.yaml", + "EBT_CARD": "./EBTCard.yaml", + "GODADDY": "../payment-token/GDPaymentTokenReference.yaml", + "APPLE_PAY": "../payment-token/ApplePayPaymentToken.yaml", + "GOOGLE_PAY": "../payment-token/GooglePayPaymentToken.yaml", + "PAYPAL": "../payment-token/PaypalPaymentToken.yaml" + } + }, + "properties": { + "sourceType": { + "type": "string", + "description": "Discriminator field representing the type of Funding source" + } + }, + "required": [ + "sourceType" + ] + }, + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + }, + "readOnly": true, + "description": "Refunds for the payment" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Last updated time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + }, + "additionalProcessingInstruction": { + "description": "Processing instruction", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-processing-instruction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Processing Instruction", + "type": "object", + "properties": { + "authOnly": { + "type": "boolean", + "default": false, + "writeOnly": true, + "description": "Perform authorize only and do not auto capture. Applicable only for AUTHORIZATION type payment" + }, + "partialAuthEnabled": { + "type": "boolean", + "default": true, + "writeOnly": true, + "description": "Allow partial authorizations. Applicable only for AUTHORIZATION and SALE type payment" + } + } + }, + "externalProcessor": { + "type": "string", + "description": "Processor that has already processed this payment externally" + } + }, + "required": [ + "type", + "amount", + "fundingSource", + "createdAt" + ] + } + }, + "responses": { + "201": { + "description": "New payment created successfully", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment", + "type": "object", + "x-tags": [ + "transaction", + "payments" + ], + "x-generic-type": "Payment", + "description": "A monetary transfer of funds from a funding source to the recipient merchant", + "properties": { + "id": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "refNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "type": { + "$id": "https://godaddy.com/schemas/commerce/payment/type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Type", + "type": "string", + "enum": [ + "AUTHORIZATION", + "SALE", + "REFUND" + ], + "description": "Payment type" + }, + "amount": { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ], + "description": "Payment amount requested" + }, + "netAmount": { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ], + "description": "Current net payment amount" + }, + "fundingSource": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Funding Source", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Card", + "type": "object", + "properties": { + "cardDetail": { + "description": "Card detail", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "writeOnly": true, + "description": "Verification data that can be used to verify the customer information", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "processingInstruction": { + "writeOnly": true, + "description": "Processing instruction to use this funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/card-processing-instruction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processing Instruction", + "type": "object", + "properties": { + "signatureRequired": { + "type": "boolean", + "default": false, + "description": "If signature is required for this transaction" + }, + "debit": { + "type": "boolean", + "default": false, + "description": "If card should be processed as debit or not" + } + } + } + }, + "required": [ + "cardDetail" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/ebt-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "EBT Card", + "type": "object", + "properties": { + "cardDetail": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "cardType": { + "type": "string", + "enum": [ + "FOOD_STAMP", + "CASH_BENEFIT", + "ELECTRONIC_VOUCHER" + ] + }, + "eVoucherSerial": { + "type": "string" + }, + "eVoucherApprovalCode": { + "type": "string" + } + }, + "required": [ + "cardDetail", + "cardType" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/gdpayment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GoDaddy PaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Godaddy Payment token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/applepay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ApplePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Apple pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/google-pay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GooglePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Google pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/paypal-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaypalPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Paypal token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + } + ], + "discriminator": { + "propertyName": "sourceType", + "mapping": { + "PAYMENT_CARD": "./PaymentCard.yaml", + "EBT_CARD": "./EBTCard.yaml", + "GODADDY": "../payment-token/GDPaymentTokenReference.yaml", + "APPLE_PAY": "../payment-token/ApplePayPaymentToken.yaml", + "GOOGLE_PAY": "../payment-token/GooglePayPaymentToken.yaml", + "PAYPAL": "../payment-token/PaypalPaymentToken.yaml" + } + }, + "properties": { + "sourceType": { + "type": "string", + "description": "Discriminator field representing the type of Funding source" + } + }, + "required": [ + "sourceType" + ] + }, + "paymentContext": { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "authorizations": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/authorization.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Authorization Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents authorization transaction against a payment" + }, + "readOnly": true, + "description": "Authorizations for the payment" + }, + "adjustments": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Adjustment Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents Adjustment transaction against a payment", + "properties": { + "newAmount": { + "description": "Adjusted transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + } + }, + "required": [ + "newAmount" + ] + }, + "readOnly": true, + "description": "Adjustments for the payment" + }, + "captures": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/capture.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Capture Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents capture transaction against a payment", + "properties": { + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + }, + "readOnly": true, + "description": "Captures for the payment" + }, + "sales": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/sale.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Sale Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents sale transaction against a payment" + }, + "readOnly": true, + "description": "Sales for the payment" + }, + "refunds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/refund.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Refund Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents refund transaction against a payment", + "properties": { + "alternateFundingSource": { + "description": "Alternate funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Funding Source", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Card", + "type": "object", + "properties": { + "cardDetail": { + "description": "Card detail", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "writeOnly": true, + "description": "Verification data that can be used to verify the customer information", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "processingInstruction": { + "writeOnly": true, + "description": "Processing instruction to use this funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/card-processing-instruction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processing Instruction", + "type": "object", + "properties": { + "signatureRequired": { + "type": "boolean", + "default": false, + "description": "If signature is required for this transaction" + }, + "debit": { + "type": "boolean", + "default": false, + "description": "If card should be processed as debit or not" + } + } + } + }, + "required": [ + "cardDetail" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/ebt-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "EBT Card", + "type": "object", + "properties": { + "cardDetail": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "cardType": { + "type": "string", + "enum": [ + "FOOD_STAMP", + "CASH_BENEFIT", + "ELECTRONIC_VOUCHER" + ] + }, + "eVoucherSerial": { + "type": "string" + }, + "eVoucherApprovalCode": { + "type": "string" + } + }, + "required": [ + "cardDetail", + "cardType" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/gdpayment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GoDaddy PaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Godaddy Payment token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/applepay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ApplePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Apple pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/google-pay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GooglePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Google pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/paypal-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaypalPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Paypal token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + } + ], + "discriminator": { + "propertyName": "sourceType", + "mapping": { + "PAYMENT_CARD": "./PaymentCard.yaml", + "EBT_CARD": "./EBTCard.yaml", + "GODADDY": "../payment-token/GDPaymentTokenReference.yaml", + "APPLE_PAY": "../payment-token/ApplePayPaymentToken.yaml", + "GOOGLE_PAY": "../payment-token/GooglePayPaymentToken.yaml", + "PAYPAL": "../payment-token/PaypalPaymentToken.yaml" + } + }, + "properties": { + "sourceType": { + "type": "string", + "description": "Discriminator field representing the type of Funding source" + } + }, + "required": [ + "sourceType" + ] + }, + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + }, + "readOnly": true, + "description": "Refunds for the payment" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Last updated time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + }, + "additionalProcessingInstruction": { + "description": "Processing instruction", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-processing-instruction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Processing Instruction", + "type": "object", + "properties": { + "authOnly": { + "type": "boolean", + "default": false, + "writeOnly": true, + "description": "Perform authorize only and do not auto capture. Applicable only for AUTHORIZATION type payment" + }, + "partialAuthEnabled": { + "type": "boolean", + "default": true, + "writeOnly": true, + "description": "Allow partial authorizations. Applicable only for AUTHORIZATION and SALE type payment" + } + } + }, + "externalProcessor": { + "type": "string", + "description": "Processor that has already processed this payment externally" + } + }, + "required": [ + "type", + "amount", + "fundingSource", + "createdAt" + ] + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "getPayments", + "method": "GET", + "path": "/stores/{storeId}/payments", + "summary": "Get Payments", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "totalRequired", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Payments list", + "schema": { + "title": "PaymentList", + "properties": { + "totalItems": { + "type": "integer" + }, + "totalPages": { + "type": "integer" + }, + "items": { + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment", + "type": "object", + "x-tags": [ + "transaction", + "payments" + ], + "x-generic-type": "Payment", + "description": "A monetary transfer of funds from a funding source to the recipient merchant", + "properties": { + "id": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "refNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "type": { + "$id": "https://godaddy.com/schemas/commerce/payment/type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Type", + "type": "string", + "enum": [ + "AUTHORIZATION", + "SALE", + "REFUND" + ], + "description": "Payment type" + }, + "amount": { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ], + "description": "Payment amount requested" + }, + "netAmount": { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ], + "description": "Current net payment amount" + }, + "fundingSource": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Funding Source", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Card", + "type": "object", + "properties": { + "cardDetail": { + "description": "Card detail", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "writeOnly": true, + "description": "Verification data that can be used to verify the customer information", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "processingInstruction": { + "writeOnly": true, + "description": "Processing instruction to use this funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/card-processing-instruction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processing Instruction", + "type": "object", + "properties": { + "signatureRequired": { + "type": "boolean", + "default": false, + "description": "If signature is required for this transaction" + }, + "debit": { + "type": "boolean", + "default": false, + "description": "If card should be processed as debit or not" + } + } + } + }, + "required": [ + "cardDetail" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/ebt-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "EBT Card", + "type": "object", + "properties": { + "cardDetail": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "cardType": { + "type": "string", + "enum": [ + "FOOD_STAMP", + "CASH_BENEFIT", + "ELECTRONIC_VOUCHER" + ] + }, + "eVoucherSerial": { + "type": "string" + }, + "eVoucherApprovalCode": { + "type": "string" + } + }, + "required": [ + "cardDetail", + "cardType" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/gdpayment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GoDaddy PaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Godaddy Payment token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/applepay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ApplePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Apple pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/google-pay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GooglePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Google pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/paypal-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaypalPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Paypal token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + } + ], + "discriminator": { + "propertyName": "sourceType", + "mapping": { + "PAYMENT_CARD": "./PaymentCard.yaml", + "EBT_CARD": "./EBTCard.yaml", + "GODADDY": "../payment-token/GDPaymentTokenReference.yaml", + "APPLE_PAY": "../payment-token/ApplePayPaymentToken.yaml", + "GOOGLE_PAY": "../payment-token/GooglePayPaymentToken.yaml", + "PAYPAL": "../payment-token/PaypalPaymentToken.yaml" + } + }, + "properties": { + "sourceType": { + "type": "string", + "description": "Discriminator field representing the type of Funding source" + } + }, + "required": [ + "sourceType" + ] + }, + "paymentContext": { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "authorizations": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/authorization.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Authorization Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents authorization transaction against a payment" + }, + "readOnly": true, + "description": "Authorizations for the payment" + }, + "adjustments": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Adjustment Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents Adjustment transaction against a payment", + "properties": { + "newAmount": { + "description": "Adjusted transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + } + }, + "required": [ + "newAmount" + ] + }, + "readOnly": true, + "description": "Adjustments for the payment" + }, + "captures": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/capture.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Capture Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents capture transaction against a payment", + "properties": { + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + }, + "readOnly": true, + "description": "Captures for the payment" + }, + "sales": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/sale.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Sale Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents sale transaction against a payment" + }, + "readOnly": true, + "description": "Sales for the payment" + }, + "refunds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/refund.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Refund Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents refund transaction against a payment", + "properties": { + "alternateFundingSource": { + "description": "Alternate funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Funding Source", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Card", + "type": "object", + "properties": { + "cardDetail": { + "description": "Card detail", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "writeOnly": true, + "description": "Verification data that can be used to verify the customer information", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "processingInstruction": { + "writeOnly": true, + "description": "Processing instruction to use this funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/card-processing-instruction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processing Instruction", + "type": "object", + "properties": { + "signatureRequired": { + "type": "boolean", + "default": false, + "description": "If signature is required for this transaction" + }, + "debit": { + "type": "boolean", + "default": false, + "description": "If card should be processed as debit or not" + } + } + } + }, + "required": [ + "cardDetail" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/ebt-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "EBT Card", + "type": "object", + "properties": { + "cardDetail": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "cardType": { + "type": "string", + "enum": [ + "FOOD_STAMP", + "CASH_BENEFIT", + "ELECTRONIC_VOUCHER" + ] + }, + "eVoucherSerial": { + "type": "string" + }, + "eVoucherApprovalCode": { + "type": "string" + } + }, + "required": [ + "cardDetail", + "cardType" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/gdpayment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GoDaddy PaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Godaddy Payment token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/applepay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ApplePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Apple pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/google-pay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GooglePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Google pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/paypal-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaypalPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Paypal token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + } + ], + "discriminator": { + "propertyName": "sourceType", + "mapping": { + "PAYMENT_CARD": "./PaymentCard.yaml", + "EBT_CARD": "./EBTCard.yaml", + "GODADDY": "../payment-token/GDPaymentTokenReference.yaml", + "APPLE_PAY": "../payment-token/ApplePayPaymentToken.yaml", + "GOOGLE_PAY": "../payment-token/GooglePayPaymentToken.yaml", + "PAYPAL": "../payment-token/PaypalPaymentToken.yaml" + } + }, + "properties": { + "sourceType": { + "type": "string", + "description": "Discriminator field representing the type of Funding source" + } + }, + "required": [ + "sourceType" + ] + }, + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + }, + "readOnly": true, + "description": "Refunds for the payment" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Last updated time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + }, + "additionalProcessingInstruction": { + "description": "Processing instruction", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-processing-instruction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Processing Instruction", + "type": "object", + "properties": { + "authOnly": { + "type": "boolean", + "default": false, + "writeOnly": true, + "description": "Perform authorize only and do not auto capture. Applicable only for AUTHORIZATION type payment" + }, + "partialAuthEnabled": { + "type": "boolean", + "default": true, + "writeOnly": true, + "description": "Allow partial authorizations. Applicable only for AUTHORIZATION and SALE type payment" + } + } + }, + "externalProcessor": { + "type": "string", + "description": "Processor that has already processed this payment externally" + } + }, + "required": [ + "type", + "amount", + "fundingSource", + "createdAt" + ] + }, + "type": "array" + }, + "links": { + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "description": "HATEOAS links", + "type": "array", + "x-auto-generated": true, + "definitions": { + "Link": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + }, + "items": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "getPaymentById", + "method": "GET", + "path": "/stores/{storeId}/payments/{paymentId}", + "summary": "Get Payment", + "description": "Retrieve the information of the Payment by the payment ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + ], + "responses": { + "200": { + "description": "Payment Found", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment", + "type": "object", + "x-tags": [ + "transaction", + "payments" + ], + "x-generic-type": "Payment", + "description": "A monetary transfer of funds from a funding source to the recipient merchant", + "properties": { + "id": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "refNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "type": { + "$id": "https://godaddy.com/schemas/commerce/payment/type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Type", + "type": "string", + "enum": [ + "AUTHORIZATION", + "SALE", + "REFUND" + ], + "description": "Payment type" + }, + "amount": { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ], + "description": "Payment amount requested" + }, + "netAmount": { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ], + "description": "Current net payment amount" + }, + "fundingSource": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Funding Source", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Card", + "type": "object", + "properties": { + "cardDetail": { + "description": "Card detail", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "writeOnly": true, + "description": "Verification data that can be used to verify the customer information", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "processingInstruction": { + "writeOnly": true, + "description": "Processing instruction to use this funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/card-processing-instruction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processing Instruction", + "type": "object", + "properties": { + "signatureRequired": { + "type": "boolean", + "default": false, + "description": "If signature is required for this transaction" + }, + "debit": { + "type": "boolean", + "default": false, + "description": "If card should be processed as debit or not" + } + } + } + }, + "required": [ + "cardDetail" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/ebt-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "EBT Card", + "type": "object", + "properties": { + "cardDetail": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "cardType": { + "type": "string", + "enum": [ + "FOOD_STAMP", + "CASH_BENEFIT", + "ELECTRONIC_VOUCHER" + ] + }, + "eVoucherSerial": { + "type": "string" + }, + "eVoucherApprovalCode": { + "type": "string" + } + }, + "required": [ + "cardDetail", + "cardType" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/gdpayment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GoDaddy PaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Godaddy Payment token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/applepay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ApplePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Apple pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/google-pay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GooglePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Google pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/paypal-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaypalPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Paypal token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + } + ], + "discriminator": { + "propertyName": "sourceType", + "mapping": { + "PAYMENT_CARD": "./PaymentCard.yaml", + "EBT_CARD": "./EBTCard.yaml", + "GODADDY": "../payment-token/GDPaymentTokenReference.yaml", + "APPLE_PAY": "../payment-token/ApplePayPaymentToken.yaml", + "GOOGLE_PAY": "../payment-token/GooglePayPaymentToken.yaml", + "PAYPAL": "../payment-token/PaypalPaymentToken.yaml" + } + }, + "properties": { + "sourceType": { + "type": "string", + "description": "Discriminator field representing the type of Funding source" + } + }, + "required": [ + "sourceType" + ] + }, + "paymentContext": { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "authorizations": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/authorization.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Authorization Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents authorization transaction against a payment" + }, + "readOnly": true, + "description": "Authorizations for the payment" + }, + "adjustments": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Adjustment Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents Adjustment transaction against a payment", + "properties": { + "newAmount": { + "description": "Adjusted transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + } + }, + "required": [ + "newAmount" + ] + }, + "readOnly": true, + "description": "Adjustments for the payment" + }, + "captures": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/capture.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Capture Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents capture transaction against a payment", + "properties": { + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + }, + "readOnly": true, + "description": "Captures for the payment" + }, + "sales": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/sale.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Sale Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents sale transaction against a payment" + }, + "readOnly": true, + "description": "Sales for the payment" + }, + "refunds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/refund.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Refund Transaction", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Represents transaction against a payment", + "x-generic-type": "Transaction", + "properties": { + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/payment/amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Payment amount" + }, + "currency": { + "description": "Payment currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/detailed-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/payment/tip-amount.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/payment/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/payment/fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/simple-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "SimpleFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/governed-fee.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernedFee", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true + } + }, + "required": [ + "amount", + "type", + "signature" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "TransactionContext", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-context.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentContext", + "type": "object", + "description": "Payment Context details", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + } + ], + "type": "object" + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/debitcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "DebitCardProcessorResponse", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/transaction/processor-response/creditcard.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/processor-response/address-verification-result.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AVS Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/payment/payment-card/address-verification-status.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ], + "description": "CVV verification result", + "readOnly": true + }, + "approvedAmount": { + "type": "integer", + "description": "If different than request amount", + "readOnly": true + }, + "approvalCode": { + "type": "string", + "readOnly": true, + "description": "Approval code that can be used for reference" + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Strong customer authentication result" + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "description": "Remaining balance amount" + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string" + } + }, + "required": [ + "processorType" + ] + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + } + }, + "required": [ + "amount", + "createdAt" + ] + } + ], + "x-generic-type": "Transaction", + "description": "Represents refund transaction against a payment", + "properties": { + "alternateFundingSource": { + "description": "Alternate funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Funding Source", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Card", + "type": "object", + "properties": { + "cardDetail": { + "description": "Card detail", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "writeOnly": true, + "description": "Verification data that can be used to verify the customer information", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "processingInstruction": { + "writeOnly": true, + "description": "Processing instruction to use this funding source", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/card-processing-instruction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processing Instruction", + "type": "object", + "properties": { + "signatureRequired": { + "type": "boolean", + "default": false, + "description": "If signature is required for this transaction" + }, + "debit": { + "type": "boolean", + "default": false, + "description": "If card should be processed as debit or not" + } + } + } + }, + "required": [ + "cardDetail" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/ebt-card.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "EBT Card", + "type": "object", + "properties": { + "cardDetail": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 1 data" + }, + "track2Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 2 data" + }, + "track3Data": { + "type": "string", + "writeOnly": true, + "description": "Card track 3 data" + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/card-entry-detail.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-card/interacmac.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/payment/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 20, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + "cardType": { + "type": "string", + "enum": [ + "FOOD_STAMP", + "CASH_BENEFIT", + "ELECTRONIC_VOUCHER" + ] + }, + "eVoucherSerial": { + "type": "string" + }, + "eVoucherApprovalCode": { + "type": "string" + } + }, + "required": [ + "cardDetail", + "cardType" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/gdpayment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GoDaddy PaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Godaddy Payment token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/applepay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ApplePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Apple pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/google-pay-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GooglePayPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Google pay token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/paypal-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaypalPaymentToken", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/payment-token.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentTokenFundingSource", + "type": "object", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "VerificationData", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/cardverification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card VerificationData", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/payment/funding-source/token-verification.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token VerificationData", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "type": "object", + "properties": { + "line1": { + "type": "string", + "description": "Address line 1" + }, + "line2": { + "type": "string", + "description": "Address line 2" + }, + "city": { + "type": "string", + "description": "City" + }, + "territory": { + "type": "string", + "description": "Territory" + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "Territory type" + }, + "country": { + "type": "string", + "description": "Country" + }, + "postalCode": { + "type": "string", + "description": "Postal Code" + } + }, + "required": [ + "line1", + "city", + "territory", + "territoryType", + "country", + "postalCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Paypal token", + "writeOnly": true + } + }, + "required": [ + "token" + ] + } + ], + "discriminator": { + "propertyName": "sourceType", + "mapping": { + "PAYMENT_CARD": "./PaymentCard.yaml", + "EBT_CARD": "./EBTCard.yaml", + "GODADDY": "../payment-token/GDPaymentTokenReference.yaml", + "APPLE_PAY": "../payment-token/ApplePayPaymentToken.yaml", + "GOOGLE_PAY": "../payment-token/GooglePayPaymentToken.yaml", + "PAYPAL": "../payment-token/PaypalPaymentToken.yaml" + } + }, + "properties": { + "sourceType": { + "type": "string", + "description": "Discriminator field representing the type of Funding source" + } + }, + "required": [ + "sourceType" + ] + }, + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + }, + "readOnly": true, + "description": "Refunds for the payment" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Last updated time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + }, + "additionalProcessingInstruction": { + "description": "Processing instruction", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/payment/transaction-processing-instruction.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Processing Instruction", + "type": "object", + "properties": { + "authOnly": { + "type": "boolean", + "default": false, + "writeOnly": true, + "description": "Perform authorize only and do not auto capture. Applicable only for AUTHORIZATION type payment" + }, + "partialAuthEnabled": { + "type": "boolean", + "default": true, + "writeOnly": true, + "description": "Allow partial authorizations. Applicable only for AUTHORIZATION and SALE type payment" + } + } + }, + "externalProcessor": { + "type": "string", + "description": "Processor that has already processed this payment externally" + } + }, + "required": [ + "type", + "amount", + "fundingSource", + "createdAt" + ] + } + }, + "404": { + "description": "Payment Not Found" + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "voidPaymentById", + "method": "DELETE", + "path": "/stores/{storeId}/payments/{paymentId}", + "summary": "Void Payment", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + } + ], + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "voidPaymentByRefNum", + "method": "DELETE", + "path": "/stores/{storeId}/payments/{paymentRefNum}", + "summary": "Void Payment", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentRefNum", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + } + } + ], + "responses": { + "200": { + "description": "Request was successful" + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error", + "type": "object", + "description": "Error details", + "properties": { + "requestId": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "code": { + "type": "string", + "readOnly": true + }, + "message": { + "type": "string", + "readOnly": true + } + } + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "getPaymentReference", + "method": "GET", + "path": "/stores/{storeId}/payments/{paymentId}/references/{value}", + "summary": "Get reference", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "value", + "in": "path", + "required": true, + "description": "Reference value", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Get payment reference by value", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-reference.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentReference", + "type": "object", + "properties": { + "value": { + "type": "string", + "maxLength": 64 + }, + "type": { + "type": "string", + "maxLength": 32 + } + }, + "required": [ + "value", + "type" + ] + } + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read", + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "createPaymentReference", + "method": "PUT", + "path": "/stores/{storeId}/payments/{paymentId}/references/{value}", + "summary": "Create Reference", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "value", + "in": "path", + "required": true, + "description": "Reference value", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": false, + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/payment-reference.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PaymentReference", + "type": "object", + "properties": { + "value": { + "type": "string", + "maxLength": 64 + }, + "type": { + "type": "string", + "maxLength": 32 + } + }, + "required": [ + "value", + "type" + ] + } + }, + "responses": { + "204": { + "description": "Resource created / updated successfully" + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + }, + { + "operationId": "deletePaymentReference", + "method": "DELETE", + "path": "/stores/{storeId}/payments/{paymentId}/references/{value}", + "summary": "Delete reference", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + }, + { + "name": "paymentId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/commerce/payment/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom URN format", + "type": "string", + "example": "urn:pmt:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", + "x-custom-type": true, + "x-custom-id": true + } + }, + { + "name": "value", + "in": "path", + "required": true, + "description": "Reference value", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Request was successful" + }, + "404": { + "description": "Reference Not Found" + } + }, + "scopes": [ + "urn:godaddy:services:commerce:payments:read-write" + ] + } + ] +} \ No newline at end of file diff --git a/src/cli/schemas/api/price-adjustments.json b/src/cli/schemas/api/price-adjustments.json new file mode 100644 index 0000000..f5a9f77 --- /dev/null +++ b/src/cli/schemas/api/price-adjustments.json @@ -0,0 +1,3355 @@ +{ + "name": "price-adjustments", + "title": "GoDaddy Price Adjustment API", + "description": "The Price Adjustment Service API is intended to provide a common service for other services and applications to build a price adjustment system for discounts and fees.\n\nThe API is composed of two main entities: Price Adjustments and Price Adjustment Associations.\n\nA Price Adjustment is a discount or fee; as well as the amount. Alone, it does nothing since it is not associated to any items.\n - This entity contains the type of adjustment, the amount of the adjustment, and other information that will be shared by all the Price Adjustment Associations that refer to it.\n - Newly created Price Adjustments will have no Price Adjustment Associations associated with them by default.\n - Updating a Price Adjustment will also soft-update Price Adjustment Associations that refer to it, since the information they refer to will have been updated.\n - Deleting a Price Adjustment will delete all the Price Adjustment Associations that refer to it, since they should not apply a non-existant Price Adjustment to anything.\n\nA Price Adjustment Association is the link between a Price Adjustment and the items the Price Adjustment applies to. Together, they make up the actual discount or fee that would be applied.\n - This entity contains the type of association, the items that the association applies to, and other information about the association itself.\n\nTo ground this in a complete example:\n\n```\n POST /commerce/stores/{storeId}/price-adjustments\n // -> creates a new Price Adjustment\n // -> but, we have nothing associated with it yet!\n // -> so it will never apply to an item/category\n // -> to do that, we need to create an association\n\n POST /commerce/stores/{storeId}/price-adjustment-associations\n // -> creates a new Price Adjustment Association\n // -> now we are associated, and it will apply!\n```\n", + "version": "1.0.0", + "baseUrl": "https://api.godaddy.com/v1", + "endpoints": [ + { + "operationId": "findAllPriceAdjustments", + "method": "GET", + "path": "/commerce/stores/{storeId}/price-adjustments", + "summary": "Get all price adjustments for a store", + "description": "Gets all applicable price adjustments for a given storeId", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "schema": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/price-adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustment", + "type": "object", + "description": "Price Adjustment Entity; contains all the information about a price adjustment", + "properties": { + "storeId": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + }, + "id": { + "type": "string", + "description": "A unique identifier for the price adjustment. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the entity was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the entity was last updated", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "name": { + "type": "string", + "description": "The user friendly name of the price adjustment", + "example": "happy hour discount" + }, + "description": { + "type": "string", + "description": "The user friendly description of the price adjustment", + "example": "15% off of drinks, 10% off of food" + }, + "type": { + "description": "The type of the price adjustment", + "example": "DISCOUNT", + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/price-adjustment-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentType", + "type": "string", + "enum": [ + "DISCOUNT", + "FEE" + ] + }, + "enabled": { + "type": "boolean", + "description": "flag for status of the price adjustment", + "example": true + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "flag for if the price adjustment should be applied pre- or post- tax", + "example": true + }, + "code": { + "type": "string", + "description": "Fee or discount code. Must be a unique code per store \n- two different stores are allowed to have the same code\n- the same store is not allowed to have two of the same code\n", + "example": "holidays2023" + }, + "externalIds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ExternalId", + "type": "object", + "description": "ExternalId is a unique identifier for a resource that is not managed by the PriceAdjustments service.\nFor example, an AvalaraId is an external id that is used to identify a tax code in Avalara.\n\nNOTE: this field has no current use in the PriceAdjustments service, but is included for use in future integrations.\n", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "the type of the external id", + "example": "AvalaraId" + }, + "value": { + "type": "string", + "description": "the value of the external id", + "example": "123456789" + } + } + }, + "description": "external ids for this price adjustment" + }, + "metadata": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafield to enable attachng additional contextual meta-information to a resource.", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "shippingPolicy" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"signatureRequired\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "amountType": { + "type": "string", + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/amount-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AmountType", + "description": "Possible ways to calculate the price adjustment amount; currently either a `PERCENTAGE` or `AMOUNT` is supported.\n- If the type is `AMOUNT`, the property `amount` in the request body is required.\n- If the type is `PERCENTAGE`, the property `ratePercentage` in the request body is required.\n", + "enum": [ + "AMOUNT", + "PERCENTAGE" + ] + }, + "amount": { + "description": "the currency code & amount of currency that makes up the amount discounted or charged for this price adjustment. Present if amountType = AMOUNT, else not present", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money", + "properties": { + "currencyCode": { + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "format": "int64", + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "the percentage that makes up the amount discounted or charged for this price adjustment. Present id amountType = PERCENTAGE, else not present", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + } + } + } + } + }, + "401": { + "description": "Unauthorized Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "403": { + "description": "Authentication Client Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "422": { + "description": "The server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + } + }, + "scopes": [ + "commerce.price-adjustment:read" + ] + }, + { + "operationId": "createPriceAdjustment", + "method": "POST", + "path": "/commerce/stores/{storeId}/price-adjustments", + "summary": "Create a new price adjustment", + "description": "Creates a new price adjustment for a given storeId", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/price-adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustment", + "type": "object", + "description": "Price Adjustment Entity; contains all the information about a price adjustment", + "properties": { + "storeId": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + }, + "id": { + "type": "string", + "description": "A unique identifier for the price adjustment. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the entity was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the entity was last updated", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "name": { + "type": "string", + "description": "The user friendly name of the price adjustment", + "example": "happy hour discount" + }, + "description": { + "type": "string", + "description": "The user friendly description of the price adjustment", + "example": "15% off of drinks, 10% off of food" + }, + "type": { + "description": "The type of the price adjustment", + "example": "DISCOUNT", + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/price-adjustment-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentType", + "type": "string", + "enum": [ + "DISCOUNT", + "FEE" + ] + }, + "enabled": { + "type": "boolean", + "description": "flag for status of the price adjustment", + "example": true + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "flag for if the price adjustment should be applied pre- or post- tax", + "example": true + }, + "code": { + "type": "string", + "description": "Fee or discount code. Must be a unique code per store \n- two different stores are allowed to have the same code\n- the same store is not allowed to have two of the same code\n", + "example": "holidays2023" + }, + "externalIds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ExternalId", + "type": "object", + "description": "ExternalId is a unique identifier for a resource that is not managed by the PriceAdjustments service.\nFor example, an AvalaraId is an external id that is used to identify a tax code in Avalara.\n\nNOTE: this field has no current use in the PriceAdjustments service, but is included for use in future integrations.\n", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "the type of the external id", + "example": "AvalaraId" + }, + "value": { + "type": "string", + "description": "the value of the external id", + "example": "123456789" + } + } + }, + "description": "external ids for this price adjustment" + }, + "metadata": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafield to enable attachng additional contextual meta-information to a resource.", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "shippingPolicy" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"signatureRequired\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "amountType": { + "type": "string", + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/amount-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AmountType", + "description": "Possible ways to calculate the price adjustment amount; currently either a `PERCENTAGE` or `AMOUNT` is supported.\n- If the type is `AMOUNT`, the property `amount` in the request body is required.\n- If the type is `PERCENTAGE`, the property `ratePercentage` in the request body is required.\n", + "enum": [ + "AMOUNT", + "PERCENTAGE" + ] + }, + "amount": { + "description": "the currency code & amount of currency that makes up the amount discounted or charged for this price adjustment. Present if amountType = AMOUNT, else not present", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money", + "properties": { + "currencyCode": { + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "format": "int64", + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "the percentage that makes up the amount discounted or charged for this price adjustment. Present id amountType = PERCENTAGE, else not present", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/price-adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustment", + "type": "object", + "description": "Price Adjustment Entity; contains all the information about a price adjustment", + "properties": { + "storeId": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + }, + "id": { + "type": "string", + "description": "A unique identifier for the price adjustment. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the entity was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the entity was last updated", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "name": { + "type": "string", + "description": "The user friendly name of the price adjustment", + "example": "happy hour discount" + }, + "description": { + "type": "string", + "description": "The user friendly description of the price adjustment", + "example": "15% off of drinks, 10% off of food" + }, + "type": { + "description": "The type of the price adjustment", + "example": "DISCOUNT", + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/price-adjustment-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentType", + "type": "string", + "enum": [ + "DISCOUNT", + "FEE" + ] + }, + "enabled": { + "type": "boolean", + "description": "flag for status of the price adjustment", + "example": true + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "flag for if the price adjustment should be applied pre- or post- tax", + "example": true + }, + "code": { + "type": "string", + "description": "Fee or discount code. Must be a unique code per store \n- two different stores are allowed to have the same code\n- the same store is not allowed to have two of the same code\n", + "example": "holidays2023" + }, + "externalIds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ExternalId", + "type": "object", + "description": "ExternalId is a unique identifier for a resource that is not managed by the PriceAdjustments service.\nFor example, an AvalaraId is an external id that is used to identify a tax code in Avalara.\n\nNOTE: this field has no current use in the PriceAdjustments service, but is included for use in future integrations.\n", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "the type of the external id", + "example": "AvalaraId" + }, + "value": { + "type": "string", + "description": "the value of the external id", + "example": "123456789" + } + } + }, + "description": "external ids for this price adjustment" + }, + "metadata": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafield to enable attachng additional contextual meta-information to a resource.", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "shippingPolicy" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"signatureRequired\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "amountType": { + "type": "string", + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/amount-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AmountType", + "description": "Possible ways to calculate the price adjustment amount; currently either a `PERCENTAGE` or `AMOUNT` is supported.\n- If the type is `AMOUNT`, the property `amount` in the request body is required.\n- If the type is `PERCENTAGE`, the property `ratePercentage` in the request body is required.\n", + "enum": [ + "AMOUNT", + "PERCENTAGE" + ] + }, + "amount": { + "description": "the currency code & amount of currency that makes up the amount discounted or charged for this price adjustment. Present if amountType = AMOUNT, else not present", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money", + "properties": { + "currencyCode": { + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "format": "int64", + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "the percentage that makes up the amount discounted or charged for this price adjustment. Present id amountType = PERCENTAGE, else not present", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + } + } + } + }, + "401": { + "description": "Unauthorized Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "403": { + "description": "Authentication Client Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "422": { + "description": "The server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + } + }, + "scopes": [ + "commerce.price-adjustment:create" + ] + }, + { + "operationId": "findPriceAdjustment", + "method": "GET", + "path": "/commerce/stores/{storeId}/price-adjustments/{adjustmentId}", + "summary": "Get a price adjustment", + "description": "Get a single price adjustment by storeId and adjustmentId", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + } + }, + { + "name": "adjustmentId", + "in": "path", + "required": true, + "description": "Price Adjustment ID", + "schema": { + "type": "string", + "description": "A unique identifier for the price adjustment. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/price-adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustment", + "type": "object", + "description": "Price Adjustment Entity; contains all the information about a price adjustment", + "properties": { + "storeId": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + }, + "id": { + "type": "string", + "description": "A unique identifier for the price adjustment. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the entity was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the entity was last updated", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "name": { + "type": "string", + "description": "The user friendly name of the price adjustment", + "example": "happy hour discount" + }, + "description": { + "type": "string", + "description": "The user friendly description of the price adjustment", + "example": "15% off of drinks, 10% off of food" + }, + "type": { + "description": "The type of the price adjustment", + "example": "DISCOUNT", + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/price-adjustment-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentType", + "type": "string", + "enum": [ + "DISCOUNT", + "FEE" + ] + }, + "enabled": { + "type": "boolean", + "description": "flag for status of the price adjustment", + "example": true + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "flag for if the price adjustment should be applied pre- or post- tax", + "example": true + }, + "code": { + "type": "string", + "description": "Fee or discount code. Must be a unique code per store \n- two different stores are allowed to have the same code\n- the same store is not allowed to have two of the same code\n", + "example": "holidays2023" + }, + "externalIds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ExternalId", + "type": "object", + "description": "ExternalId is a unique identifier for a resource that is not managed by the PriceAdjustments service.\nFor example, an AvalaraId is an external id that is used to identify a tax code in Avalara.\n\nNOTE: this field has no current use in the PriceAdjustments service, but is included for use in future integrations.\n", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "the type of the external id", + "example": "AvalaraId" + }, + "value": { + "type": "string", + "description": "the value of the external id", + "example": "123456789" + } + } + }, + "description": "external ids for this price adjustment" + }, + "metadata": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafield to enable attachng additional contextual meta-information to a resource.", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "shippingPolicy" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"signatureRequired\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "amountType": { + "type": "string", + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/amount-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AmountType", + "description": "Possible ways to calculate the price adjustment amount; currently either a `PERCENTAGE` or `AMOUNT` is supported.\n- If the type is `AMOUNT`, the property `amount` in the request body is required.\n- If the type is `PERCENTAGE`, the property `ratePercentage` in the request body is required.\n", + "enum": [ + "AMOUNT", + "PERCENTAGE" + ] + }, + "amount": { + "description": "the currency code & amount of currency that makes up the amount discounted or charged for this price adjustment. Present if amountType = AMOUNT, else not present", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money", + "properties": { + "currencyCode": { + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "format": "int64", + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "the percentage that makes up the amount discounted or charged for this price adjustment. Present id amountType = PERCENTAGE, else not present", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + } + } + } + }, + "401": { + "description": "Unauthorized Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "403": { + "description": "Authentication Client Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "422": { + "description": "The server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + } + }, + "scopes": [ + "commerce.price-adjustment:read" + ] + }, + { + "operationId": "updatePriceAdjustment", + "method": "PATCH", + "path": "/commerce/stores/{storeId}/price-adjustments/{adjustmentId}", + "summary": "Update a price adjustment", + "description": "Update a price adjustment", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + } + }, + { + "name": "adjustmentId", + "in": "path", + "required": true, + "description": "Price Adjustment ID", + "schema": { + "type": "string", + "description": "A unique identifier for the price adjustment. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/price-adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustment", + "type": "object", + "description": "Price Adjustment Entity; contains all the information about a price adjustment", + "properties": { + "storeId": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + }, + "id": { + "type": "string", + "description": "A unique identifier for the price adjustment. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the entity was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the entity was last updated", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "name": { + "type": "string", + "description": "The user friendly name of the price adjustment", + "example": "happy hour discount" + }, + "description": { + "type": "string", + "description": "The user friendly description of the price adjustment", + "example": "15% off of drinks, 10% off of food" + }, + "type": { + "description": "The type of the price adjustment", + "example": "DISCOUNT", + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/price-adjustment-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentType", + "type": "string", + "enum": [ + "DISCOUNT", + "FEE" + ] + }, + "enabled": { + "type": "boolean", + "description": "flag for status of the price adjustment", + "example": true + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "flag for if the price adjustment should be applied pre- or post- tax", + "example": true + }, + "code": { + "type": "string", + "description": "Fee or discount code. Must be a unique code per store \n- two different stores are allowed to have the same code\n- the same store is not allowed to have two of the same code\n", + "example": "holidays2023" + }, + "externalIds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ExternalId", + "type": "object", + "description": "ExternalId is a unique identifier for a resource that is not managed by the PriceAdjustments service.\nFor example, an AvalaraId is an external id that is used to identify a tax code in Avalara.\n\nNOTE: this field has no current use in the PriceAdjustments service, but is included for use in future integrations.\n", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "the type of the external id", + "example": "AvalaraId" + }, + "value": { + "type": "string", + "description": "the value of the external id", + "example": "123456789" + } + } + }, + "description": "external ids for this price adjustment" + }, + "metadata": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafield to enable attachng additional contextual meta-information to a resource.", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "shippingPolicy" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"signatureRequired\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "amountType": { + "type": "string", + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/amount-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AmountType", + "description": "Possible ways to calculate the price adjustment amount; currently either a `PERCENTAGE` or `AMOUNT` is supported.\n- If the type is `AMOUNT`, the property `amount` in the request body is required.\n- If the type is `PERCENTAGE`, the property `ratePercentage` in the request body is required.\n", + "enum": [ + "AMOUNT", + "PERCENTAGE" + ] + }, + "amount": { + "description": "the currency code & amount of currency that makes up the amount discounted or charged for this price adjustment. Present if amountType = AMOUNT, else not present", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money", + "properties": { + "currencyCode": { + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "format": "int64", + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "the percentage that makes up the amount discounted or charged for this price adjustment. Present id amountType = PERCENTAGE, else not present", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/price-adjustment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustment", + "type": "object", + "description": "Price Adjustment Entity; contains all the information about a price adjustment", + "properties": { + "storeId": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + }, + "id": { + "type": "string", + "description": "A unique identifier for the price adjustment. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the entity was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the entity was last updated", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "name": { + "type": "string", + "description": "The user friendly name of the price adjustment", + "example": "happy hour discount" + }, + "description": { + "type": "string", + "description": "The user friendly description of the price adjustment", + "example": "15% off of drinks, 10% off of food" + }, + "type": { + "description": "The type of the price adjustment", + "example": "DISCOUNT", + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/price-adjustment-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentType", + "type": "string", + "enum": [ + "DISCOUNT", + "FEE" + ] + }, + "enabled": { + "type": "boolean", + "description": "flag for status of the price adjustment", + "example": true + }, + "appliedBeforeTax": { + "type": "boolean", + "description": "flag for if the price adjustment should be applied pre- or post- tax", + "example": true + }, + "code": { + "type": "string", + "description": "Fee or discount code. Must be a unique code per store \n- two different stores are allowed to have the same code\n- the same store is not allowed to have two of the same code\n", + "example": "holidays2023" + }, + "externalIds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ExternalId", + "type": "object", + "description": "ExternalId is a unique identifier for a resource that is not managed by the PriceAdjustments service.\nFor example, an AvalaraId is an external id that is used to identify a tax code in Avalara.\n\nNOTE: this field has no current use in the PriceAdjustments service, but is included for use in future integrations.\n", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "the type of the external id", + "example": "AvalaraId" + }, + "value": { + "type": "string", + "description": "the value of the external id", + "example": "123456789" + } + } + }, + "description": "external ids for this price adjustment" + }, + "metadata": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafield to enable attachng additional contextual meta-information to a resource.", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "shippingPolicy" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"signatureRequired\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "amountType": { + "type": "string", + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/amount-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "AmountType", + "description": "Possible ways to calculate the price adjustment amount; currently either a `PERCENTAGE` or `AMOUNT` is supported.\n- If the type is `AMOUNT`, the property `amount` in the request body is required.\n- If the type is `PERCENTAGE`, the property `ratePercentage` in the request body is required.\n", + "enum": [ + "AMOUNT", + "PERCENTAGE" + ] + }, + "amount": { + "description": "the currency code & amount of currency that makes up the amount discounted or charged for this price adjustment. Present if amountType = AMOUNT, else not present", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money", + "properties": { + "currencyCode": { + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "format": "int64", + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "ratePercentage": { + "description": "the percentage that makes up the amount discounted or charged for this price adjustment. Present id amountType = PERCENTAGE, else not present", + "$id": "https://godaddy.com/schemas/common/percentage.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$" + } + } + } + }, + "401": { + "description": "Unauthorized Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "403": { + "description": "Authentication Client Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "422": { + "description": "The server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + } + }, + "scopes": [ + "commerce.price-adjustment:write" + ] + }, + { + "operationId": "deletePriceAdjustment", + "method": "DELETE", + "path": "/commerce/stores/{storeId}/price-adjustments/{adjustmentId}", + "summary": "Delete a price adjustment", + "description": "Delete a price adjustment", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + } + }, + { + "name": "adjustmentId", + "in": "path", + "required": true, + "description": "Price Adjustment ID", + "schema": { + "type": "string", + "description": "A unique identifier for the price adjustment. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "Successful response" + }, + "401": { + "description": "Unauthorized Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "403": { + "description": "Authentication Client Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "422": { + "description": "The server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + } + }, + "scopes": [ + "commerce.price-adjustment:delete" + ] + }, + { + "operationId": "findAllPriceAdjustmentAssociations", + "method": "GET", + "path": "/commerce/stores/{storeId}/price-adjustment-associations", + "summary": "Get all price adjustment associations", + "description": "Get all price adjustment associations", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "schema": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/price-adjustment-association.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentAssociation", + "type": "object", + "description": "Price Adjustment Association Entity; contains all the information about a price adjustment association", + "properties": { + "storeId": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + }, + "id": { + "type": "string", + "description": "A unique identifier for the price adjustment association. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the entity was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the entity was last updated", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "priceAdjustmentId": { + "type": "string", + "format": "uuid", + "description": "the id of the price adjustment that this price adjustment association refers to" + }, + "externalIds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ExternalId", + "type": "object", + "description": "ExternalId is a unique identifier for a resource that is not managed by the PriceAdjustments service.\nFor example, an AvalaraId is an external id that is used to identify a tax code in Avalara.\n\nNOTE: this field has no current use in the PriceAdjustments service, but is included for use in future integrations.\n", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "the type of the external id", + "example": "AvalaraId" + }, + "value": { + "type": "string", + "description": "the value of the external id", + "example": "123456789" + } + } + } + }, + "type": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/price-adjustment-association-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentAssociationType", + "type": "string", + "description": "Possible types of price adjustment association; Currently only `ADJUSTMENT` is supported.", + "enum": [ + "ADJUSTMENT" + ] + }, + "name": { + "type": "string", + "description": "the name for this price adjustment association" + }, + "metadata": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafield to enable attachng additional contextual meta-information to a resource.", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "shippingPolicy" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"signatureRequired\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "items": { + "type": "array", + "description": "items this price adjustment association apply to", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + } + } + } + } + } + }, + "401": { + "description": "Unauthorized Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "403": { + "description": "Authentication Client Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "422": { + "description": "The server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + } + }, + "scopes": [ + "commerce.price-adjustment-association:read" + ] + }, + { + "operationId": "createPriceAdjustmentAssociation", + "method": "POST", + "path": "/commerce/stores/{storeId}/price-adjustment-associations", + "summary": "Create a price adjustment association", + "description": "Create a price adjustment association", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/price-adjustment-association.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentAssociation", + "type": "object", + "description": "Price Adjustment Association Entity; contains all the information about a price adjustment association", + "properties": { + "storeId": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + }, + "id": { + "type": "string", + "description": "A unique identifier for the price adjustment association. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the entity was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the entity was last updated", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "priceAdjustmentId": { + "type": "string", + "format": "uuid", + "description": "the id of the price adjustment that this price adjustment association refers to" + }, + "externalIds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ExternalId", + "type": "object", + "description": "ExternalId is a unique identifier for a resource that is not managed by the PriceAdjustments service.\nFor example, an AvalaraId is an external id that is used to identify a tax code in Avalara.\n\nNOTE: this field has no current use in the PriceAdjustments service, but is included for use in future integrations.\n", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "the type of the external id", + "example": "AvalaraId" + }, + "value": { + "type": "string", + "description": "the value of the external id", + "example": "123456789" + } + } + } + }, + "type": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/price-adjustment-association-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentAssociationType", + "type": "string", + "description": "Possible types of price adjustment association; Currently only `ADJUSTMENT` is supported.", + "enum": [ + "ADJUSTMENT" + ] + }, + "name": { + "type": "string", + "description": "the name for this price adjustment association" + }, + "metadata": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafield to enable attachng additional contextual meta-information to a resource.", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "shippingPolicy" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"signatureRequired\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "items": { + "type": "array", + "description": "items this price adjustment association apply to", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/price-adjustment-association.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentAssociation", + "type": "object", + "description": "Price Adjustment Association Entity; contains all the information about a price adjustment association", + "properties": { + "storeId": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + }, + "id": { + "type": "string", + "description": "A unique identifier for the price adjustment association. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the entity was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the entity was last updated", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "priceAdjustmentId": { + "type": "string", + "format": "uuid", + "description": "the id of the price adjustment that this price adjustment association refers to" + }, + "externalIds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ExternalId", + "type": "object", + "description": "ExternalId is a unique identifier for a resource that is not managed by the PriceAdjustments service.\nFor example, an AvalaraId is an external id that is used to identify a tax code in Avalara.\n\nNOTE: this field has no current use in the PriceAdjustments service, but is included for use in future integrations.\n", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "the type of the external id", + "example": "AvalaraId" + }, + "value": { + "type": "string", + "description": "the value of the external id", + "example": "123456789" + } + } + } + }, + "type": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/price-adjustment-association-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentAssociationType", + "type": "string", + "description": "Possible types of price adjustment association; Currently only `ADJUSTMENT` is supported.", + "enum": [ + "ADJUSTMENT" + ] + }, + "name": { + "type": "string", + "description": "the name for this price adjustment association" + }, + "metadata": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafield to enable attachng additional contextual meta-information to a resource.", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "shippingPolicy" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"signatureRequired\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "items": { + "type": "array", + "description": "items this price adjustment association apply to", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + } + } + } + } + }, + "401": { + "description": "Unauthorized Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "403": { + "description": "Authentication Client Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "422": { + "description": "The server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + } + }, + "scopes": [ + "commerce.price-adjustment-association:create" + ] + }, + { + "operationId": "findPriceAdjustmentAssociation", + "method": "GET", + "path": "/commerce/stores/{storeId}/price-adjustment-associations/{associationId}", + "summary": "Get a price adjustment association", + "description": "Get a price adjustment association", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + } + }, + { + "name": "associationId", + "in": "path", + "required": true, + "description": "Price Adjustment Association ID", + "schema": { + "type": "string", + "description": "A unique identifier for the price adjustment association. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/price-adjustment-association.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentAssociation", + "type": "object", + "description": "Price Adjustment Association Entity; contains all the information about a price adjustment association", + "properties": { + "storeId": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + }, + "id": { + "type": "string", + "description": "A unique identifier for the price adjustment association. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the entity was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the entity was last updated", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "priceAdjustmentId": { + "type": "string", + "format": "uuid", + "description": "the id of the price adjustment that this price adjustment association refers to" + }, + "externalIds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ExternalId", + "type": "object", + "description": "ExternalId is a unique identifier for a resource that is not managed by the PriceAdjustments service.\nFor example, an AvalaraId is an external id that is used to identify a tax code in Avalara.\n\nNOTE: this field has no current use in the PriceAdjustments service, but is included for use in future integrations.\n", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "the type of the external id", + "example": "AvalaraId" + }, + "value": { + "type": "string", + "description": "the value of the external id", + "example": "123456789" + } + } + } + }, + "type": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/price-adjustment-association-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentAssociationType", + "type": "string", + "description": "Possible types of price adjustment association; Currently only `ADJUSTMENT` is supported.", + "enum": [ + "ADJUSTMENT" + ] + }, + "name": { + "type": "string", + "description": "the name for this price adjustment association" + }, + "metadata": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafield to enable attachng additional contextual meta-information to a resource.", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "shippingPolicy" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"signatureRequired\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "items": { + "type": "array", + "description": "items this price adjustment association apply to", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + } + } + } + } + }, + "401": { + "description": "Unauthorized Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "403": { + "description": "Authentication Client Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "422": { + "description": "The server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + } + }, + "scopes": [ + "commerce.price-adjustment-association:read" + ] + }, + { + "operationId": "updatePriceAdjustmentAssociation", + "method": "PATCH", + "path": "/commerce/stores/{storeId}/price-adjustment-associations/{associationId}", + "summary": "Update a price adjustment association", + "description": "Update a price adjustment association", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + } + }, + { + "name": "associationId", + "in": "path", + "required": true, + "description": "Price Adjustment Association ID", + "schema": { + "type": "string", + "description": "A unique identifier for the price adjustment association. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/price-adjustment-association.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentAssociation", + "type": "object", + "description": "Price Adjustment Association Entity; contains all the information about a price adjustment association", + "properties": { + "storeId": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + }, + "id": { + "type": "string", + "description": "A unique identifier for the price adjustment association. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the entity was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the entity was last updated", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "priceAdjustmentId": { + "type": "string", + "format": "uuid", + "description": "the id of the price adjustment that this price adjustment association refers to" + }, + "externalIds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ExternalId", + "type": "object", + "description": "ExternalId is a unique identifier for a resource that is not managed by the PriceAdjustments service.\nFor example, an AvalaraId is an external id that is used to identify a tax code in Avalara.\n\nNOTE: this field has no current use in the PriceAdjustments service, but is included for use in future integrations.\n", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "the type of the external id", + "example": "AvalaraId" + }, + "value": { + "type": "string", + "description": "the value of the external id", + "example": "123456789" + } + } + } + }, + "type": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/price-adjustment-association-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentAssociationType", + "type": "string", + "description": "Possible types of price adjustment association; Currently only `ADJUSTMENT` is supported.", + "enum": [ + "ADJUSTMENT" + ] + }, + "name": { + "type": "string", + "description": "the name for this price adjustment association" + }, + "metadata": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafield to enable attachng additional contextual meta-information to a resource.", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "shippingPolicy" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"signatureRequired\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "items": { + "type": "array", + "description": "items this price adjustment association apply to", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/price-adjustment-association.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentAssociation", + "type": "object", + "description": "Price Adjustment Association Entity; contains all the information about a price adjustment association", + "properties": { + "storeId": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + }, + "id": { + "type": "string", + "description": "A unique identifier for the price adjustment association. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + }, + "createdAt": { + "readOnly": true, + "description": "The datetime when the entity was created", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "readOnly": true, + "description": "The datetime when the entity was last updated", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "priceAdjustmentId": { + "type": "string", + "format": "uuid", + "description": "the id of the price adjustment that this price adjustment association refers to" + }, + "externalIds": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/external-id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ExternalId", + "type": "object", + "description": "ExternalId is a unique identifier for a resource that is not managed by the PriceAdjustments service.\nFor example, an AvalaraId is an external id that is used to identify a tax code in Avalara.\n\nNOTE: this field has no current use in the PriceAdjustments service, but is included for use in future integrations.\n", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "description": "the type of the external id", + "example": "AvalaraId" + }, + "value": { + "type": "string", + "description": "the value of the external id", + "example": "123456789" + } + } + } + }, + "type": { + "$id": "https://godaddy.com/schemas/commerce/price-adjustments/enums/price-adjustment-association-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "PriceAdjustmentAssociationType", + "type": "string", + "description": "Possible types of price adjustment association; Currently only `ADJUSTMENT` is supported.", + "enum": [ + "ADJUSTMENT" + ] + }, + "name": { + "type": "string", + "description": "the name for this price adjustment association" + }, + "metadata": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/orders/metafield.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Metafield", + "type": "object", + "description": "Metafield to enable attachng additional contextual meta-information to a resource.", + "required": [ + "key", + "type", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The unique identifier for the metafield in its namespace", + "example": "shippingPolicy" + }, + "type": { + "type": "string", + "description": "The type of data that the metafield stores in the `value` field", + "enum": [ + "JSON" + ], + "default": "JSON" + }, + "value": { + "type": "string", + "description": "The data to store in the metafield. The data is always stored as a string, regardless of the metafield's type", + "example": "{ \"signatureRequired\" : \"true\" }", + "maxLength": 1024 + } + } + } + }, + "items": { + "type": "array", + "description": "items this price adjustment association apply to", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "type", + "id" + ] + } + } + } + } + }, + "401": { + "description": "Unauthorized Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "403": { + "description": "Authentication Client Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "422": { + "description": "The server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + } + }, + "scopes": [ + "commerce.price-adjustment-association:write" + ] + }, + { + "operationId": "deletePriceAdjustmentAssociation", + "method": "DELETE", + "path": "/commerce/stores/{storeId}/price-adjustment-associations/{associationId}", + "summary": "Delete a price adjustment association", + "description": "Delete a price adjustment association", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID", + "schema": { + "type": "string", + "description": "The storeId that this price adjustment belongs to", + "readOnly": true, + "format": "uuid" + } + }, + { + "name": "associationId", + "in": "path", + "required": true, + "description": "Price Adjustment Association ID", + "schema": { + "type": "string", + "description": "A unique identifier for the price adjustment association. Auto-generated on creation", + "readOnly": true, + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "Successful response" + }, + "401": { + "description": "Unauthorized Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "403": { + "description": "Authentication Client Error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "422": { + "description": "The server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + } + }, + "required": [ + "code", + "message" + ] + } + } + }, + "scopes": [ + "commerce.price-adjustment-association:delete" + ] + } + ] +} \ No newline at end of file diff --git a/src/cli/schemas/api/recommendations.json b/src/cli/schemas/api/recommendations.json new file mode 100644 index 0000000..56201e3 --- /dev/null +++ b/src/cli/schemas/api/recommendations.json @@ -0,0 +1,1675 @@ +{ + "name": "recommendations", + "title": "GoDaddy Recommendation API", + "description": "", + "version": "1.0.0", + "baseUrl": "https://api.godaddy.com/v1/commerce", + "endpoints": [ + { + "operationId": "get_recommendations", + "method": "GET", + "path": "/recommendations", + "summary": "Return product recommendations", + "description": "Returns a recommendation with customer, business and/or product insights.", + "parameters": [ + { + "name": "customerId", + "in": "query", + "required": true, + "description": "The Customer ID", + "schema": { + "type": "string", + "format": "uuid", + "example": "3f7f3b31-3140-4479-a1ad-117afc1514a7" + } + }, + { + "name": "format", + "in": "query", + "required": false, + "description": "Format of the response", + "schema": { + "type": "string", + "enum": [ + "rad" + ] + } + }, + { + "name": "domain", + "in": "query", + "required": false, + "description": "Customer's domain", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Request was successful", + "schema": { + "oneOf": [ + { + "type": "object", + "description": "Customer or Domain insights raw format", + "properties": { + "insights": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "domain": { + "type": "string" + } + } + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "powerseller": { + "type": "boolean" + }, + "cohort": { + "type": "string" + }, + "confidence": { + "type": "integer" + }, + "line-of-business": { + "type": "string" + }, + "sales-channel": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "sales-volume": { + "type": "number" + } + } + } + ] + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "powerseller": { + "type": "boolean" + }, + "cohort": { + "type": "string" + }, + "confidence": { + "type": "integer" + }, + "line-of-business": { + "type": "string" + }, + "sales-channel": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "sales-volume": { + "type": "number" + } + } + } + ] + } + ] + } + } + }, + { + "type": "object", + "description": "RAD Entity API Format necessary to integrate with RAD Platform", + "properties": { + "results": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "data": { + "type": "object", + "description": "Customer or Domain insights raw format", + "properties": { + "insights": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "domain": { + "type": "string" + } + } + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "powerseller": { + "type": "boolean" + }, + "cohort": { + "type": "string" + }, + "confidence": { + "type": "integer" + }, + "line-of-business": { + "type": "string" + }, + "sales-channel": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "sales-volume": { + "type": "number" + } + } + } + ] + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "powerseller": { + "type": "boolean" + }, + "cohort": { + "type": "string" + }, + "confidence": { + "type": "integer" + }, + "line-of-business": { + "type": "string" + }, + "sales-channel": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "sales-volume": { + "type": "number" + } + } + } + ] + } + ] + } + } + }, + "type": { + "type": "string" + } + } + } + } + } + ] + } + }, + "400": { + "description": "Bad Request Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "401": { + "description": "Unauthorized Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "403": { + "description": "Authentication Client Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "409": { + "description": "A request conflict with the current state of the target resource", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "422": { + "description": "The server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [] + } + ] +} \ No newline at end of file diff --git a/src/cli/schemas/api/registry.generated.ts b/src/cli/schemas/api/registry.generated.ts index 600fbc2..c3ffd57 100644 --- a/src/cli/schemas/api/registry.generated.ts +++ b/src/cli/schemas/api/registry.generated.ts @@ -7,24 +7,42 @@ import bulk_operations_json from "./bulk-operations.json"; import businesses_json from "./businesses.json"; import catalog_products_json from "./catalog-products.json"; import channels_json from "./channels.json"; +import chargebacks_json from "./chargebacks.json"; +import customer_profiles_json from "./customer-profiles.json"; import fulfillments_json from "./fulfillments.json"; import location_addresses_json from "./location-addresses.json"; import metafields_json from "./metafields.json"; import onboarding_json from "./onboarding.json"; import orders_json from "./orders.json"; +import payment_requests_json from "./payment-requests.json"; +import payments_json from "./payments.json"; +import price_adjustments_json from "./price-adjustments.json"; +import recommendations_json from "./recommendations.json"; +import shipping_json from "./shipping.json"; import stores_json from "./stores.json"; +import subscriptions_json from "./subscriptions.json"; +import taxes_json from "./taxes.json"; import transactions_json from "./transactions.json"; export const DOMAIN_REGISTRY: Record = { "bulk-operations": bulk_operations_json, - businesses: businesses_json, + "businesses": businesses_json, "catalog-products": catalog_products_json, - channels: channels_json, - fulfillments: fulfillments_json, + "channels": channels_json, + "chargebacks": chargebacks_json, + "customer-profiles": customer_profiles_json, + "fulfillments": fulfillments_json, "location-addresses": location_addresses_json, - metafields: metafields_json, - onboarding: onboarding_json, - orders: orders_json, - stores: stores_json, - transactions: transactions_json, + "metafields": metafields_json, + "onboarding": onboarding_json, + "orders": orders_json, + "payment-requests": payment_requests_json, + "payments": payments_json, + "price-adjustments": price_adjustments_json, + "recommendations": recommendations_json, + "shipping": shipping_json, + "stores": stores_json, + "subscriptions": subscriptions_json, + "taxes": taxes_json, + "transactions": transactions_json, }; diff --git a/src/cli/schemas/api/shipping.json b/src/cli/schemas/api/shipping.json new file mode 100644 index 0000000..f0f2bc7 --- /dev/null +++ b/src/cli/schemas/api/shipping.json @@ -0,0 +1,6826 @@ +{ + "name": "shipping", + "title": "Shipping Service", + "description": "This API can be used for managing shipping", + "version": "1.9.0", + "baseUrl": "https://api.godaddy.com", + "endpoints": [ + { + "operationId": "createShipment", + "method": "POST", + "path": "/v1/commerce/stores/{storeId}/shipping/shipments", + "summary": "Create a new shipment", + "description": "Create a new shipment", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID" + } + ], + "requestBody": { + "required": true, + "description": "The shipment object to create", + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipment", + "type": "object", + "description": "A shipment contains all of the information needed to ship items to a customer.", + "required": [ + "providerId", + "fulfillmentId", + "orderId", + "shipFrom", + "shipTo", + "packages", + "confirmation", + "shipDate", + "isReturnLabel", + "isInternational" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipment (Shipment_). Auto-generated by the service on creation", + "readOnly": true + }, + "providerId": { + "type": "string", + "description": "The unique identifier for the commerce shipping provider." + }, + "fulfillmentId": { + "type": "string", + "description": "The unique identifier for the commerce fulfillment." + }, + "orderId": { + "type": "string", + "description": "ID associated with the commerce order." + }, + "shipFrom": { + "type": "object", + "description": "The sender's address", + "$id": "https://godaddy.com/schemas/commerce/shipments/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "properties": { + "name": { + "type": "string", + "description": "Name" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "email": { + "type": "string", + "format": "email", + "description": "Email address" + }, + "addressLine1": { + "type": "string", + "description": "Address" + }, + "addressLine2": { + "type": "string", + "description": "Address" + }, + "addressLine3": { + "type": "string", + "description": "Address" + }, + "city": { + "type": "string", + "description": "City" + }, + "state": { + "type": "string", + "description": "State" + }, + "postalCode": { + "type": "string", + "description": "Postal code" + }, + "country": { + "type": "string", + "description": "Country" + }, + "isResidential": { + "type": "boolean", + "description": "Boolean" + }, + "instructions": { + "type": "string", + "description": "Instructions" + } + } + }, + "shipTo": { + "type": "object", + "description": "The recipient's address", + "$id": "https://godaddy.com/schemas/commerce/shipments/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "properties": { + "name": { + "type": "string", + "description": "Name" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "email": { + "type": "string", + "format": "email", + "description": "Email address" + }, + "addressLine1": { + "type": "string", + "description": "Address" + }, + "addressLine2": { + "type": "string", + "description": "Address" + }, + "addressLine3": { + "type": "string", + "description": "Address" + }, + "city": { + "type": "string", + "description": "City" + }, + "state": { + "type": "string", + "description": "State" + }, + "postalCode": { + "type": "string", + "description": "Postal code" + }, + "country": { + "type": "string", + "description": "Country" + }, + "isResidential": { + "type": "boolean", + "description": "Boolean" + }, + "instructions": { + "type": "string", + "description": "Instructions" + } + } + }, + "packages": { + "type": "array", + "description": "The packages in the shipment", + "items": { + "type": "object", + "properties": { + "packageCode": { + "type": "string", + "description": "Package code" + }, + "products": { + "type": "array", + "items": { + "type": "object", + "properties": { + "quantity": { + "type": "number", + "description": "The quantity of the product in the package" + }, + "productId": { + "type": "string", + "description": "The unique identifier for the product" + }, + "name": { + "type": "string", + "description": "The name of the product" + } + } + } + }, + "weight": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "The weight value" + }, + "units": { + "type": "string", + "description": "The weight units", + "enum": [ + "ounces", + "pounds", + "grams", + "kilograms" + ] + } + } + }, + "dimensions": { + "type": "object", + "properties": { + "units": { + "type": "string", + "description": "The dimension units", + "enum": [ + "inches", + "centimeters" + ] + }, + "length": { + "type": "number", + "description": "The length value" + }, + "width": { + "type": "number", + "description": "The width value" + }, + "height": { + "type": "number", + "description": "The height value" + } + } + } + } + }, + "minItems": 1 + }, + "confirmation": { + "type": "string", + "description": "The confirmation type", + "enum": [ + "none", + "delivery", + "signature" + ] + }, + "shipDate": { + "description": "The ship date", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "isReturnLabel": { + "type": "boolean", + "description": "Indicates if the shipment is a return label" + }, + "isInternational": { + "type": "boolean", + "description": "Indicates if the shipment is international" + }, + "advancedOptions": { + "type": "array", + "description": "Advanced options selected for the shipment. The possible options are stored in the carrier advanced options.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/advanced-shipment-option.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Advanced Shipment Option", + "type": "object", + "description": "These are the advanced carrier options that were selected when creating a shipment.", + "properties": { + "name": { + "type": "string", + "description": "The name of the advanced option." + }, + "value": { + "type": "string", + "description": "The value selected for the advanced option." + } + } + } + }, + "createdAt": { + "description": "The date and time the shipment was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the shipment was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "responses": { + "200": { + "description": "Successfully created the shipment", + "schema": { + "type": "object", + "title": "ShipmentCreated", + "required": [ + "status", + "shipment" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "shipment": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipment", + "type": "object", + "description": "A shipment contains all of the information needed to ship items to a customer.", + "required": [ + "providerId", + "fulfillmentId", + "orderId", + "shipFrom", + "shipTo", + "packages", + "confirmation", + "shipDate", + "isReturnLabel", + "isInternational" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipment (Shipment_). Auto-generated by the service on creation", + "readOnly": true + }, + "providerId": { + "type": "string", + "description": "The unique identifier for the commerce shipping provider." + }, + "fulfillmentId": { + "type": "string", + "description": "The unique identifier for the commerce fulfillment." + }, + "orderId": { + "type": "string", + "description": "ID associated with the commerce order." + }, + "shipFrom": { + "type": "object", + "description": "The sender's address", + "$id": "https://godaddy.com/schemas/commerce/shipments/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "properties": { + "name": { + "type": "string", + "description": "Name" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "email": { + "type": "string", + "format": "email", + "description": "Email address" + }, + "addressLine1": { + "type": "string", + "description": "Address" + }, + "addressLine2": { + "type": "string", + "description": "Address" + }, + "addressLine3": { + "type": "string", + "description": "Address" + }, + "city": { + "type": "string", + "description": "City" + }, + "state": { + "type": "string", + "description": "State" + }, + "postalCode": { + "type": "string", + "description": "Postal code" + }, + "country": { + "type": "string", + "description": "Country" + }, + "isResidential": { + "type": "boolean", + "description": "Boolean" + }, + "instructions": { + "type": "string", + "description": "Instructions" + } + } + }, + "shipTo": { + "type": "object", + "description": "The recipient's address", + "$id": "https://godaddy.com/schemas/commerce/shipments/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "properties": { + "name": { + "type": "string", + "description": "Name" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "email": { + "type": "string", + "format": "email", + "description": "Email address" + }, + "addressLine1": { + "type": "string", + "description": "Address" + }, + "addressLine2": { + "type": "string", + "description": "Address" + }, + "addressLine3": { + "type": "string", + "description": "Address" + }, + "city": { + "type": "string", + "description": "City" + }, + "state": { + "type": "string", + "description": "State" + }, + "postalCode": { + "type": "string", + "description": "Postal code" + }, + "country": { + "type": "string", + "description": "Country" + }, + "isResidential": { + "type": "boolean", + "description": "Boolean" + }, + "instructions": { + "type": "string", + "description": "Instructions" + } + } + }, + "packages": { + "type": "array", + "description": "The packages in the shipment", + "items": { + "type": "object", + "properties": { + "packageCode": { + "type": "string", + "description": "Package code" + }, + "products": { + "type": "array", + "items": { + "type": "object", + "properties": { + "quantity": { + "type": "number", + "description": "The quantity of the product in the package" + }, + "productId": { + "type": "string", + "description": "The unique identifier for the product" + }, + "name": { + "type": "string", + "description": "The name of the product" + } + } + } + }, + "weight": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "The weight value" + }, + "units": { + "type": "string", + "description": "The weight units", + "enum": [ + "ounces", + "pounds", + "grams", + "kilograms" + ] + } + } + }, + "dimensions": { + "type": "object", + "properties": { + "units": { + "type": "string", + "description": "The dimension units", + "enum": [ + "inches", + "centimeters" + ] + }, + "length": { + "type": "number", + "description": "The length value" + }, + "width": { + "type": "number", + "description": "The width value" + }, + "height": { + "type": "number", + "description": "The height value" + } + } + } + } + }, + "minItems": 1 + }, + "confirmation": { + "type": "string", + "description": "The confirmation type", + "enum": [ + "none", + "delivery", + "signature" + ] + }, + "shipDate": { + "description": "The ship date", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "isReturnLabel": { + "type": "boolean", + "description": "Indicates if the shipment is a return label" + }, + "isInternational": { + "type": "boolean", + "description": "Indicates if the shipment is international" + }, + "advancedOptions": { + "type": "array", + "description": "Advanced options selected for the shipment. The possible options are stored in the carrier advanced options.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/advanced-shipment-option.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Advanced Shipment Option", + "type": "object", + "description": "These are the advanced carrier options that were selected when creating a shipment.", + "properties": { + "name": { + "type": "string", + "description": "The name of the advanced option." + }, + "value": { + "type": "string", + "description": "The value selected for the advanced option." + } + } + } + }, + "createdAt": { + "description": "The date and time the shipment was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the shipment was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.shipment:create" + ] + }, + { + "operationId": "queryShipments", + "method": "GET", + "path": "/v1/commerce/stores/{storeId}/shipping/shipments", + "summary": "List all shipments", + "description": "Find shipments and filter them using the criteria provided", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID" + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "A non-negative, non-zero integer indicating the maximum number of resouces to return at one time", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100, + "default": 25 + } + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "description": "Returns the resources that come after this specified cursor", + "schema": { + "type": "string", + "description": "A cursor for use in pagination", + "example": "MTY1MTc0NTczMDAwMDsyRzVWc1dFRmhJa3RIOFBZNHFDMGlPR0RwVko=" + } + }, + { + "name": "pageTokenDirection", + "in": "query", + "required": false, + "description": "Direction indicator used for cursor based pagination", + "schema": { + "type": "string", + "description": "Page token direction", + "enum": [ + "BACKWARD", + "FORWARD" + ], + "default": "FORWARD" + } + } + ], + "responses": { + "200": { + "description": "Successfully listed shipments", + "schema": { + "type": "object", + "title": "Shipments", + "required": [ + "status", + "shipments", + "links" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "shipments": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipment", + "type": "object", + "description": "A shipment contains all of the information needed to ship items to a customer.", + "required": [ + "providerId", + "fulfillmentId", + "orderId", + "shipFrom", + "shipTo", + "packages", + "confirmation", + "shipDate", + "isReturnLabel", + "isInternational" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipment (Shipment_). Auto-generated by the service on creation", + "readOnly": true + }, + "providerId": { + "type": "string", + "description": "The unique identifier for the commerce shipping provider." + }, + "fulfillmentId": { + "type": "string", + "description": "The unique identifier for the commerce fulfillment." + }, + "orderId": { + "type": "string", + "description": "ID associated with the commerce order." + }, + "shipFrom": { + "type": "object", + "description": "The sender's address", + "$id": "https://godaddy.com/schemas/commerce/shipments/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "properties": { + "name": { + "type": "string", + "description": "Name" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "email": { + "type": "string", + "format": "email", + "description": "Email address" + }, + "addressLine1": { + "type": "string", + "description": "Address" + }, + "addressLine2": { + "type": "string", + "description": "Address" + }, + "addressLine3": { + "type": "string", + "description": "Address" + }, + "city": { + "type": "string", + "description": "City" + }, + "state": { + "type": "string", + "description": "State" + }, + "postalCode": { + "type": "string", + "description": "Postal code" + }, + "country": { + "type": "string", + "description": "Country" + }, + "isResidential": { + "type": "boolean", + "description": "Boolean" + }, + "instructions": { + "type": "string", + "description": "Instructions" + } + } + }, + "shipTo": { + "type": "object", + "description": "The recipient's address", + "$id": "https://godaddy.com/schemas/commerce/shipments/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "properties": { + "name": { + "type": "string", + "description": "Name" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "email": { + "type": "string", + "format": "email", + "description": "Email address" + }, + "addressLine1": { + "type": "string", + "description": "Address" + }, + "addressLine2": { + "type": "string", + "description": "Address" + }, + "addressLine3": { + "type": "string", + "description": "Address" + }, + "city": { + "type": "string", + "description": "City" + }, + "state": { + "type": "string", + "description": "State" + }, + "postalCode": { + "type": "string", + "description": "Postal code" + }, + "country": { + "type": "string", + "description": "Country" + }, + "isResidential": { + "type": "boolean", + "description": "Boolean" + }, + "instructions": { + "type": "string", + "description": "Instructions" + } + } + }, + "packages": { + "type": "array", + "description": "The packages in the shipment", + "items": { + "type": "object", + "properties": { + "packageCode": { + "type": "string", + "description": "Package code" + }, + "products": { + "type": "array", + "items": { + "type": "object", + "properties": { + "quantity": { + "type": "number", + "description": "The quantity of the product in the package" + }, + "productId": { + "type": "string", + "description": "The unique identifier for the product" + }, + "name": { + "type": "string", + "description": "The name of the product" + } + } + } + }, + "weight": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "The weight value" + }, + "units": { + "type": "string", + "description": "The weight units", + "enum": [ + "ounces", + "pounds", + "grams", + "kilograms" + ] + } + } + }, + "dimensions": { + "type": "object", + "properties": { + "units": { + "type": "string", + "description": "The dimension units", + "enum": [ + "inches", + "centimeters" + ] + }, + "length": { + "type": "number", + "description": "The length value" + }, + "width": { + "type": "number", + "description": "The width value" + }, + "height": { + "type": "number", + "description": "The height value" + } + } + } + } + }, + "minItems": 1 + }, + "confirmation": { + "type": "string", + "description": "The confirmation type", + "enum": [ + "none", + "delivery", + "signature" + ] + }, + "shipDate": { + "description": "The ship date", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "isReturnLabel": { + "type": "boolean", + "description": "Indicates if the shipment is a return label" + }, + "isInternational": { + "type": "boolean", + "description": "Indicates if the shipment is international" + }, + "advancedOptions": { + "type": "array", + "description": "Advanced options selected for the shipment. The possible options are stored in the carrier advanced options.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/advanced-shipment-option.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Advanced Shipment Option", + "type": "object", + "description": "These are the advanced carrier options that were selected when creating a shipment.", + "properties": { + "name": { + "type": "string", + "description": "The name of the advanced option." + }, + "value": { + "type": "string", + "description": "The value selected for the advanced option." + } + } + } + }, + "createdAt": { + "description": "The date and time the shipment was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the shipment was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "links": { + "type": "array", + "description": "Array containing one or more HATEOAS link relations that are relevant for traversing shipments", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.shipment:read" + ] + }, + { + "operationId": "findShipment", + "method": "GET", + "path": "/v1/commerce/stores/{storeId}/shipping/shipments/{shipmentId}", + "summary": "Find a shipment", + "description": "Find a single shipment using the shipment ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID" + }, + { + "name": "shipmentId", + "in": "path", + "required": true, + "description": "The ID of the shipment", + "schema": { + "type": "string", + "format": "uuid", + "description": "UUID of the shipment" + } + } + ], + "responses": { + "200": { + "description": "Successfully found the shipment", + "schema": { + "type": "object", + "required": [ + "status", + "shipment" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "shipment": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipment", + "type": "object", + "description": "A shipment contains all of the information needed to ship items to a customer.", + "required": [ + "providerId", + "fulfillmentId", + "orderId", + "shipFrom", + "shipTo", + "packages", + "confirmation", + "shipDate", + "isReturnLabel", + "isInternational" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipment (Shipment_). Auto-generated by the service on creation", + "readOnly": true + }, + "providerId": { + "type": "string", + "description": "The unique identifier for the commerce shipping provider." + }, + "fulfillmentId": { + "type": "string", + "description": "The unique identifier for the commerce fulfillment." + }, + "orderId": { + "type": "string", + "description": "ID associated with the commerce order." + }, + "shipFrom": { + "type": "object", + "description": "The sender's address", + "$id": "https://godaddy.com/schemas/commerce/shipments/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "properties": { + "name": { + "type": "string", + "description": "Name" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "email": { + "type": "string", + "format": "email", + "description": "Email address" + }, + "addressLine1": { + "type": "string", + "description": "Address" + }, + "addressLine2": { + "type": "string", + "description": "Address" + }, + "addressLine3": { + "type": "string", + "description": "Address" + }, + "city": { + "type": "string", + "description": "City" + }, + "state": { + "type": "string", + "description": "State" + }, + "postalCode": { + "type": "string", + "description": "Postal code" + }, + "country": { + "type": "string", + "description": "Country" + }, + "isResidential": { + "type": "boolean", + "description": "Boolean" + }, + "instructions": { + "type": "string", + "description": "Instructions" + } + } + }, + "shipTo": { + "type": "object", + "description": "The recipient's address", + "$id": "https://godaddy.com/schemas/commerce/shipments/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "properties": { + "name": { + "type": "string", + "description": "Name" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "email": { + "type": "string", + "format": "email", + "description": "Email address" + }, + "addressLine1": { + "type": "string", + "description": "Address" + }, + "addressLine2": { + "type": "string", + "description": "Address" + }, + "addressLine3": { + "type": "string", + "description": "Address" + }, + "city": { + "type": "string", + "description": "City" + }, + "state": { + "type": "string", + "description": "State" + }, + "postalCode": { + "type": "string", + "description": "Postal code" + }, + "country": { + "type": "string", + "description": "Country" + }, + "isResidential": { + "type": "boolean", + "description": "Boolean" + }, + "instructions": { + "type": "string", + "description": "Instructions" + } + } + }, + "packages": { + "type": "array", + "description": "The packages in the shipment", + "items": { + "type": "object", + "properties": { + "packageCode": { + "type": "string", + "description": "Package code" + }, + "products": { + "type": "array", + "items": { + "type": "object", + "properties": { + "quantity": { + "type": "number", + "description": "The quantity of the product in the package" + }, + "productId": { + "type": "string", + "description": "The unique identifier for the product" + }, + "name": { + "type": "string", + "description": "The name of the product" + } + } + } + }, + "weight": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "The weight value" + }, + "units": { + "type": "string", + "description": "The weight units", + "enum": [ + "ounces", + "pounds", + "grams", + "kilograms" + ] + } + } + }, + "dimensions": { + "type": "object", + "properties": { + "units": { + "type": "string", + "description": "The dimension units", + "enum": [ + "inches", + "centimeters" + ] + }, + "length": { + "type": "number", + "description": "The length value" + }, + "width": { + "type": "number", + "description": "The width value" + }, + "height": { + "type": "number", + "description": "The height value" + } + } + } + } + }, + "minItems": 1 + }, + "confirmation": { + "type": "string", + "description": "The confirmation type", + "enum": [ + "none", + "delivery", + "signature" + ] + }, + "shipDate": { + "description": "The ship date", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "isReturnLabel": { + "type": "boolean", + "description": "Indicates if the shipment is a return label" + }, + "isInternational": { + "type": "boolean", + "description": "Indicates if the shipment is international" + }, + "advancedOptions": { + "type": "array", + "description": "Advanced options selected for the shipment. The possible options are stored in the carrier advanced options.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/advanced-shipment-option.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Advanced Shipment Option", + "type": "object", + "description": "These are the advanced carrier options that were selected when creating a shipment.", + "properties": { + "name": { + "type": "string", + "description": "The name of the advanced option." + }, + "value": { + "type": "string", + "description": "The value selected for the advanced option." + } + } + } + }, + "createdAt": { + "description": "The date and time the shipment was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the shipment was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.shipment:read" + ] + }, + { + "operationId": "cancelShipment", + "method": "POST", + "path": "/v1/commerce/stores/{storeId}/shipping/shipments/{shipmentId}/cancel", + "summary": "Cancel a shipment", + "description": "Cancel a shipment using the store and shipment IDs.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID" + }, + { + "name": "shipmentId", + "in": "path", + "required": true, + "description": "The ID of the shipment", + "schema": { + "type": "string", + "format": "uuid", + "description": "UUID of the shipment" + } + } + ], + "responses": { + "200": { + "description": "Successfully canceled the shipment", + "schema": { + "type": "object", + "required": [ + "status", + "shipment" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "shipment": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipment.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipment", + "type": "object", + "description": "A shipment contains all of the information needed to ship items to a customer.", + "required": [ + "providerId", + "fulfillmentId", + "orderId", + "shipFrom", + "shipTo", + "packages", + "confirmation", + "shipDate", + "isReturnLabel", + "isInternational" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the shipment (Shipment_). Auto-generated by the service on creation", + "readOnly": true + }, + "providerId": { + "type": "string", + "description": "The unique identifier for the commerce shipping provider." + }, + "fulfillmentId": { + "type": "string", + "description": "The unique identifier for the commerce fulfillment." + }, + "orderId": { + "type": "string", + "description": "ID associated with the commerce order." + }, + "shipFrom": { + "type": "object", + "description": "The sender's address", + "$id": "https://godaddy.com/schemas/commerce/shipments/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "properties": { + "name": { + "type": "string", + "description": "Name" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "email": { + "type": "string", + "format": "email", + "description": "Email address" + }, + "addressLine1": { + "type": "string", + "description": "Address" + }, + "addressLine2": { + "type": "string", + "description": "Address" + }, + "addressLine3": { + "type": "string", + "description": "Address" + }, + "city": { + "type": "string", + "description": "City" + }, + "state": { + "type": "string", + "description": "State" + }, + "postalCode": { + "type": "string", + "description": "Postal code" + }, + "country": { + "type": "string", + "description": "Country" + }, + "isResidential": { + "type": "boolean", + "description": "Boolean" + }, + "instructions": { + "type": "string", + "description": "Instructions" + } + } + }, + "shipTo": { + "type": "object", + "description": "The recipient's address", + "$id": "https://godaddy.com/schemas/commerce/shipments/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address", + "properties": { + "name": { + "type": "string", + "description": "Name" + }, + "phone": { + "type": "string", + "description": "Phone number" + }, + "email": { + "type": "string", + "format": "email", + "description": "Email address" + }, + "addressLine1": { + "type": "string", + "description": "Address" + }, + "addressLine2": { + "type": "string", + "description": "Address" + }, + "addressLine3": { + "type": "string", + "description": "Address" + }, + "city": { + "type": "string", + "description": "City" + }, + "state": { + "type": "string", + "description": "State" + }, + "postalCode": { + "type": "string", + "description": "Postal code" + }, + "country": { + "type": "string", + "description": "Country" + }, + "isResidential": { + "type": "boolean", + "description": "Boolean" + }, + "instructions": { + "type": "string", + "description": "Instructions" + } + } + }, + "packages": { + "type": "array", + "description": "The packages in the shipment", + "items": { + "type": "object", + "properties": { + "packageCode": { + "type": "string", + "description": "Package code" + }, + "products": { + "type": "array", + "items": { + "type": "object", + "properties": { + "quantity": { + "type": "number", + "description": "The quantity of the product in the package" + }, + "productId": { + "type": "string", + "description": "The unique identifier for the product" + }, + "name": { + "type": "string", + "description": "The name of the product" + } + } + } + }, + "weight": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "The weight value" + }, + "units": { + "type": "string", + "description": "The weight units", + "enum": [ + "ounces", + "pounds", + "grams", + "kilograms" + ] + } + } + }, + "dimensions": { + "type": "object", + "properties": { + "units": { + "type": "string", + "description": "The dimension units", + "enum": [ + "inches", + "centimeters" + ] + }, + "length": { + "type": "number", + "description": "The length value" + }, + "width": { + "type": "number", + "description": "The width value" + }, + "height": { + "type": "number", + "description": "The height value" + } + } + } + } + }, + "minItems": 1 + }, + "confirmation": { + "type": "string", + "description": "The confirmation type", + "enum": [ + "none", + "delivery", + "signature" + ] + }, + "shipDate": { + "description": "The ship date", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "isReturnLabel": { + "type": "boolean", + "description": "Indicates if the shipment is a return label" + }, + "isInternational": { + "type": "boolean", + "description": "Indicates if the shipment is international" + }, + "advancedOptions": { + "type": "array", + "description": "Advanced options selected for the shipment. The possible options are stored in the carrier advanced options.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/advanced-shipment-option.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Advanced Shipment Option", + "type": "object", + "description": "These are the advanced carrier options that were selected when creating a shipment.", + "properties": { + "name": { + "type": "string", + "description": "The name of the advanced option." + }, + "value": { + "type": "string", + "description": "The value selected for the advanced option." + } + } + } + }, + "createdAt": { + "description": "The date and time the shipment was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the shipment was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.shipment:cancel" + ] + }, + { + "operationId": "createCarrier", + "method": "POST", + "path": "/v1/commerce/stores/{storeId}/shipping/carriers", + "summary": "Create a new carrier", + "description": "Create a new carrier", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID" + } + ], + "requestBody": { + "required": true, + "description": "The carrier object to create", + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/shipments/carrier.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Carrier", + "type": "object", + "description": "A carrier is a company that provides shipping services. ie. UPS, FedEx, USPS", + "required": [ + "providerId", + "carrierName", + "carrierCode" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the carrier (Carrier_). Auto-generated by the service on creation", + "readOnly": true + }, + "providerId": { + "type": "string", + "description": "The unique identifier for the commerce shipping provider that the carrier belongs to." + }, + "carrierName": { + "type": "string", + "description": "Used as the display name for the carrier." + }, + "carrierCode": { + "type": "string", + "description": "A code used by the shipping provider to identify the carrier." + }, + "advancedOptions": { + "type": "array", + "description": "Advanced options provided by the carrier which can be selected when creating a shipment.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/advanced-option.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Advanced Option", + "type": "object", + "description": "These are options that are provided by the carrier that can be selected when creating a shipment.", + "properties": { + "name": { + "type": "string", + "description": "The name of the advanced option." + }, + "optionType": { + "type": "string", + "description": "The type of the advanced option." + }, + "required": { + "type": "boolean", + "description": "Indicates if the advanced option is required." + }, + "allowedValues": { + "type": "array", + "description": "Allowed values for the advanced option.", + "items": { + "type": "string" + } + }, + "defaultValue": { + "type": "string", + "description": "The default value of the advanced option." + }, + "optionDescription": { + "type": "string", + "description": "The description of the advanced option." + } + } + } + }, + "shipmentValidationRules": { + "type": "array", + "description": "Validation rules used when creating a shipment with the carrier.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipping-validation-rule.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Validation Rule", + "type": "object", + "description": "Custom validation rules for the carrier.", + "properties": { + "field": { + "type": "string", + "description": "The field that the validation rule applies to. Should be in dot notation. ie 'shipTo.city'" + }, + "ruleType": { + "type": "string", + "enum": [ + "required", + "regex", + "length", + "range", + "list" + ], + "description": "The type of the validation rule." + }, + "ruleValue": { + "type": "string", + "description": "The value of the validation rule." + } + } + } + }, + "rateValidationRules": { + "type": "array", + "description": "Validation rules used when getting rates with the carrier.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipping-validation-rule.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Validation Rule", + "type": "object", + "description": "Custom validation rules for the carrier.", + "properties": { + "field": { + "type": "string", + "description": "The field that the validation rule applies to. Should be in dot notation. ie 'shipTo.city'" + }, + "ruleType": { + "type": "string", + "enum": [ + "required", + "regex", + "length", + "range", + "list" + ], + "description": "The type of the validation rule." + }, + "ruleValue": { + "type": "string", + "description": "The value of the validation rule." + } + } + } + }, + "labelValidationRules": { + "type": "array", + "description": "Validation rules used when creating a label with the carrier.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipping-validation-rule.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Validation Rule", + "type": "object", + "description": "Custom validation rules for the carrier.", + "properties": { + "field": { + "type": "string", + "description": "The field that the validation rule applies to. Should be in dot notation. ie 'shipTo.city'" + }, + "ruleType": { + "type": "string", + "enum": [ + "required", + "regex", + "length", + "range", + "list" + ], + "description": "The type of the validation rule." + }, + "ruleValue": { + "type": "string", + "description": "The value of the validation rule." + } + } + } + }, + "createdAt": { + "description": "The date and time the record was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the record was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "responses": { + "200": { + "description": "Successfully created the carrier", + "schema": { + "type": "object", + "title": "CarrierCreated", + "required": [ + "status", + "carrier" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "carrier": { + "$id": "https://godaddy.com/schemas/commerce/shipments/carrier.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Carrier", + "type": "object", + "description": "A carrier is a company that provides shipping services. ie. UPS, FedEx, USPS", + "required": [ + "providerId", + "carrierName", + "carrierCode" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the carrier (Carrier_). Auto-generated by the service on creation", + "readOnly": true + }, + "providerId": { + "type": "string", + "description": "The unique identifier for the commerce shipping provider that the carrier belongs to." + }, + "carrierName": { + "type": "string", + "description": "Used as the display name for the carrier." + }, + "carrierCode": { + "type": "string", + "description": "A code used by the shipping provider to identify the carrier." + }, + "advancedOptions": { + "type": "array", + "description": "Advanced options provided by the carrier which can be selected when creating a shipment.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/advanced-option.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Advanced Option", + "type": "object", + "description": "These are options that are provided by the carrier that can be selected when creating a shipment.", + "properties": { + "name": { + "type": "string", + "description": "The name of the advanced option." + }, + "optionType": { + "type": "string", + "description": "The type of the advanced option." + }, + "required": { + "type": "boolean", + "description": "Indicates if the advanced option is required." + }, + "allowedValues": { + "type": "array", + "description": "Allowed values for the advanced option.", + "items": { + "type": "string" + } + }, + "defaultValue": { + "type": "string", + "description": "The default value of the advanced option." + }, + "optionDescription": { + "type": "string", + "description": "The description of the advanced option." + } + } + } + }, + "shipmentValidationRules": { + "type": "array", + "description": "Validation rules used when creating a shipment with the carrier.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipping-validation-rule.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Validation Rule", + "type": "object", + "description": "Custom validation rules for the carrier.", + "properties": { + "field": { + "type": "string", + "description": "The field that the validation rule applies to. Should be in dot notation. ie 'shipTo.city'" + }, + "ruleType": { + "type": "string", + "enum": [ + "required", + "regex", + "length", + "range", + "list" + ], + "description": "The type of the validation rule." + }, + "ruleValue": { + "type": "string", + "description": "The value of the validation rule." + } + } + } + }, + "rateValidationRules": { + "type": "array", + "description": "Validation rules used when getting rates with the carrier.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipping-validation-rule.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Validation Rule", + "type": "object", + "description": "Custom validation rules for the carrier.", + "properties": { + "field": { + "type": "string", + "description": "The field that the validation rule applies to. Should be in dot notation. ie 'shipTo.city'" + }, + "ruleType": { + "type": "string", + "enum": [ + "required", + "regex", + "length", + "range", + "list" + ], + "description": "The type of the validation rule." + }, + "ruleValue": { + "type": "string", + "description": "The value of the validation rule." + } + } + } + }, + "labelValidationRules": { + "type": "array", + "description": "Validation rules used when creating a label with the carrier.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipping-validation-rule.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Validation Rule", + "type": "object", + "description": "Custom validation rules for the carrier.", + "properties": { + "field": { + "type": "string", + "description": "The field that the validation rule applies to. Should be in dot notation. ie 'shipTo.city'" + }, + "ruleType": { + "type": "string", + "enum": [ + "required", + "regex", + "length", + "range", + "list" + ], + "description": "The type of the validation rule." + }, + "ruleValue": { + "type": "string", + "description": "The value of the validation rule." + } + } + } + }, + "createdAt": { + "description": "The date and time the record was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the record was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.carrier:create" + ] + }, + { + "operationId": "queryCarriers", + "method": "GET", + "path": "/v1/commerce/stores/{storeId}/shipping/carriers", + "summary": "List all carriers", + "description": "Find carriers and filter them using the criteria provided", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID" + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "description": "A non-negative, non-zero integer indicating the maximum number of resouces to return at one time", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100, + "default": 25 + } + }, + { + "name": "pageToken", + "in": "query", + "required": false, + "description": "Returns the resources that come after this specified cursor", + "schema": { + "type": "string", + "description": "A cursor for use in pagination", + "example": "MTY1MTc0NTczMDAwMDsyRzVWc1dFRmhJa3RIOFBZNHFDMGlPR0RwVko=" + } + }, + { + "name": "pageTokenDirection", + "in": "query", + "required": false, + "description": "Direction indicator used for cursor based pagination", + "schema": { + "type": "string", + "description": "Page token direction", + "enum": [ + "BACKWARD", + "FORWARD" + ], + "default": "FORWARD" + } + } + ], + "responses": { + "200": { + "description": "Successfully listed carriers", + "schema": { + "type": "object", + "title": "Carriers", + "required": [ + "status", + "carriers", + "links" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "carriers": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/carrier.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Carrier", + "type": "object", + "description": "A carrier is a company that provides shipping services. ie. UPS, FedEx, USPS", + "required": [ + "providerId", + "carrierName", + "carrierCode" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the carrier (Carrier_). Auto-generated by the service on creation", + "readOnly": true + }, + "providerId": { + "type": "string", + "description": "The unique identifier for the commerce shipping provider that the carrier belongs to." + }, + "carrierName": { + "type": "string", + "description": "Used as the display name for the carrier." + }, + "carrierCode": { + "type": "string", + "description": "A code used by the shipping provider to identify the carrier." + }, + "advancedOptions": { + "type": "array", + "description": "Advanced options provided by the carrier which can be selected when creating a shipment.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/advanced-option.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Advanced Option", + "type": "object", + "description": "These are options that are provided by the carrier that can be selected when creating a shipment.", + "properties": { + "name": { + "type": "string", + "description": "The name of the advanced option." + }, + "optionType": { + "type": "string", + "description": "The type of the advanced option." + }, + "required": { + "type": "boolean", + "description": "Indicates if the advanced option is required." + }, + "allowedValues": { + "type": "array", + "description": "Allowed values for the advanced option.", + "items": { + "type": "string" + } + }, + "defaultValue": { + "type": "string", + "description": "The default value of the advanced option." + }, + "optionDescription": { + "type": "string", + "description": "The description of the advanced option." + } + } + } + }, + "shipmentValidationRules": { + "type": "array", + "description": "Validation rules used when creating a shipment with the carrier.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipping-validation-rule.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Validation Rule", + "type": "object", + "description": "Custom validation rules for the carrier.", + "properties": { + "field": { + "type": "string", + "description": "The field that the validation rule applies to. Should be in dot notation. ie 'shipTo.city'" + }, + "ruleType": { + "type": "string", + "enum": [ + "required", + "regex", + "length", + "range", + "list" + ], + "description": "The type of the validation rule." + }, + "ruleValue": { + "type": "string", + "description": "The value of the validation rule." + } + } + } + }, + "rateValidationRules": { + "type": "array", + "description": "Validation rules used when getting rates with the carrier.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipping-validation-rule.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Validation Rule", + "type": "object", + "description": "Custom validation rules for the carrier.", + "properties": { + "field": { + "type": "string", + "description": "The field that the validation rule applies to. Should be in dot notation. ie 'shipTo.city'" + }, + "ruleType": { + "type": "string", + "enum": [ + "required", + "regex", + "length", + "range", + "list" + ], + "description": "The type of the validation rule." + }, + "ruleValue": { + "type": "string", + "description": "The value of the validation rule." + } + } + } + }, + "labelValidationRules": { + "type": "array", + "description": "Validation rules used when creating a label with the carrier.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipping-validation-rule.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Validation Rule", + "type": "object", + "description": "Custom validation rules for the carrier.", + "properties": { + "field": { + "type": "string", + "description": "The field that the validation rule applies to. Should be in dot notation. ie 'shipTo.city'" + }, + "ruleType": { + "type": "string", + "enum": [ + "required", + "regex", + "length", + "range", + "list" + ], + "description": "The type of the validation rule." + }, + "ruleValue": { + "type": "string", + "description": "The value of the validation rule." + } + } + } + }, + "createdAt": { + "description": "The date and time the record was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the record was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + }, + "links": { + "type": "array", + "description": "Array containing one or more HATEOAS link relations that are relevant for traversing carriers", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.carrier:read" + ] + }, + { + "operationId": "findCarrier", + "method": "GET", + "path": "/v1/commerce/stores/{storeId}/shipping/carriers/{carrierId}", + "summary": "Find a carrier", + "description": "Find a single carrier using the carrier ID.", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "description": "Store ID" + } + ], + "responses": { + "200": { + "description": "Successfully found the carrier", + "schema": { + "type": "object", + "required": [ + "status", + "carrier" + ], + "properties": { + "status": { + "type": "string", + "description": "Status of the response", + "example": "success" + }, + "carrier": { + "$id": "https://godaddy.com/schemas/commerce/shipments/carrier.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Carrier", + "type": "object", + "description": "A carrier is a company that provides shipping services. ie. UPS, FedEx, USPS", + "required": [ + "providerId", + "carrierName", + "carrierCode" + ], + "properties": { + "id": { + "type": "string", + "description": "An identifier unique to the carrier (Carrier_). Auto-generated by the service on creation", + "readOnly": true + }, + "providerId": { + "type": "string", + "description": "The unique identifier for the commerce shipping provider that the carrier belongs to." + }, + "carrierName": { + "type": "string", + "description": "Used as the display name for the carrier." + }, + "carrierCode": { + "type": "string", + "description": "A code used by the shipping provider to identify the carrier." + }, + "advancedOptions": { + "type": "array", + "description": "Advanced options provided by the carrier which can be selected when creating a shipment.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/advanced-option.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Advanced Option", + "type": "object", + "description": "These are options that are provided by the carrier that can be selected when creating a shipment.", + "properties": { + "name": { + "type": "string", + "description": "The name of the advanced option." + }, + "optionType": { + "type": "string", + "description": "The type of the advanced option." + }, + "required": { + "type": "boolean", + "description": "Indicates if the advanced option is required." + }, + "allowedValues": { + "type": "array", + "description": "Allowed values for the advanced option.", + "items": { + "type": "string" + } + }, + "defaultValue": { + "type": "string", + "description": "The default value of the advanced option." + }, + "optionDescription": { + "type": "string", + "description": "The description of the advanced option." + } + } + } + }, + "shipmentValidationRules": { + "type": "array", + "description": "Validation rules used when creating a shipment with the carrier.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipping-validation-rule.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Validation Rule", + "type": "object", + "description": "Custom validation rules for the carrier.", + "properties": { + "field": { + "type": "string", + "description": "The field that the validation rule applies to. Should be in dot notation. ie 'shipTo.city'" + }, + "ruleType": { + "type": "string", + "enum": [ + "required", + "regex", + "length", + "range", + "list" + ], + "description": "The type of the validation rule." + }, + "ruleValue": { + "type": "string", + "description": "The value of the validation rule." + } + } + } + }, + "rateValidationRules": { + "type": "array", + "description": "Validation rules used when getting rates with the carrier.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipping-validation-rule.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Validation Rule", + "type": "object", + "description": "Custom validation rules for the carrier.", + "properties": { + "field": { + "type": "string", + "description": "The field that the validation rule applies to. Should be in dot notation. ie 'shipTo.city'" + }, + "ruleType": { + "type": "string", + "enum": [ + "required", + "regex", + "length", + "range", + "list" + ], + "description": "The type of the validation rule." + }, + "ruleValue": { + "type": "string", + "description": "The value of the validation rule." + } + } + } + }, + "labelValidationRules": { + "type": "array", + "description": "Validation rules used when creating a label with the carrier.", + "items": { + "$id": "https://godaddy.com/schemas/commerce/shipments/shipping-validation-rule.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Shipping Validation Rule", + "type": "object", + "description": "Custom validation rules for the carrier.", + "properties": { + "field": { + "type": "string", + "description": "The field that the validation rule applies to. Should be in dot notation. ie 'shipTo.city'" + }, + "ruleType": { + "type": "string", + "enum": [ + "required", + "regex", + "length", + "range", + "list" + ], + "description": "The type of the validation rule." + }, + "ruleValue": { + "type": "string", + "description": "The value of the validation rule." + } + } + } + }, + "createdAt": { + "description": "The date and time the record was created", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The date and time the record was last updated", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + } + } + } + } + }, + "401": { + "description": "Authentication info not sent or is invalid", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "403": { + "description": "Authenticated user is not allowed access", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "404": { + "description": "Resource not found", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "409": { + "description": "Application-specific server state error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "422": { + "description": "Application-specific request error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "502": { + "description": "Bad gateway or failed dependency", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "503": { + "description": "Service is temporarily unavailable", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "504": { + "description": "Gateway or dependency timeout", + "schema": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + }, + "fields": { + "type": "array", + "description": "List of the specific fields, and the errors found with their contents", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "path", + "code" + ], + "properties": { + "path": { + "type": "string", + "format": "json-path", + "description": "1) JSONPath referring to the field within the data containing an error or 2) JSONPath referring to an object containing an error", + "example": "JSONPath" + }, + "pathRelated": { + "type": "string", + "format": "json-path", + "description": "JSONPath referring to the field on the object referenced by `path` containing an error", + "example": "JSONPath" + }, + "code": { + "type": "string", + "format": "error-code", + "pattern": "^[A-Z_][A-Z0-9_]*$", + "description": "Short identifier for the error, suitable for indicating the specific error within client code" + }, + "message": { + "type": "string", + "description": "Human-readable, English description of the error" + } + } + } + }, + "stack": { + "type": "array", + "description": "Stack trace indicating where the error occurred. NOTE: This attribute MAY be included for Development and Test environments. However, it MUST NOT be exposed from OTE nor Production systems", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "scopes": [ + "commerce.carrier:read" + ] + } + ] +} \ No newline at end of file diff --git a/src/cli/schemas/api/stores.json b/src/cli/schemas/api/stores.json index fa4d8db..65cdf32 100644 --- a/src/cli/schemas/api/stores.json +++ b/src/cli/schemas/api/stores.json @@ -27,21 +27,1310 @@ "required": false, "contentType": "application/json", "schema": { - "$ref": "./models/Store.yaml" + "$id": "https://godaddy.com/schemas/commerce/store.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store", + "type": "object", + "properties": { + "address": { + "description": "The store's address. This may or may not be different from business address.", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "attributes": { + "description": "A name/value pair list that could be persisted and later retrieved.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "createdAt": { + "type": "string", + "description": "The createdAt of the store. This createdAt is generated internally during create store.", + "format": "date-time", + "readOnly": true + }, + "defaultChannelId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "defaultRetailChannelId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "displayName": { + "type": "string", + "description": "The store name (used in various displays). It is recommended to pick a different name for each store in the business.", + "maxLength": 64 + }, + "emailAddress": { + "type": "string", + "maxLength": 64, + "description": "The email address of the store." + }, + "governmentIds": { + "maxItems": 10, + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/store-government-id.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernmentId", + "description": "GovernmentId details", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "The time (in ISO-8601 format) at which the application was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "governmentId": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The government id. E.g. '123456789'" + }, + "type": { + "type": "string", + "minLength": 1, + "maxLength": 32, + "description": "The type of government id. E.g. 'drivers-license'" + }, + "updatedAt": { + "type": "string", + "description": "The time (in ISO-8601 format) at which the application was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "required": [ + "governmentId", + "type" + ] + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "businessId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "phone": { + "description": "The store's phone. This may or may not be different from business phone.", + "$id": "https://godaddy.com/schemas/commerce/store/phone-with-type.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Phone with Type", + "type": "object", + "properties": { + "details": { + "description": "Phone number details", + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "type": { + "description": "Phone type", + "$id": "https://godaddy.com/schemas/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + } + }, + "required": [ + "details" + ] + }, + "status": { + "type": "string", + "default": "ACTIVE", + "enum": [ + "ACTIVE", + "DISABLED", + "REMOVED" + ], + "description": "The status of the store." + }, + "subscribedBundles": { + "description": "The list of bundles this store has subscribed to.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/store-bundled-features.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bundled Features", + "description": "This is the base object for the list of features a business/store has subscribed to.", + "deprecated": true, + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "featureConfig": { + "description": "Optional configs for each feature in the list.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "featureList": { + "description": "List of features the bundle contains.", + "maxItems": 80, + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "description": "Name of bundle.", + "maxLength": 64 + }, + "type": { + "type": "string", + "description": "The type of the bundle." + }, + "updatedAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "required": [ + "featureList", + "id", + "name" + ] + } + }, + "timezone": { + "type": "string", + "description": "The timezone of the store.", + "maxLength": 64 + }, + "updatedAt": { + "type": "string", + "description": "The updatedAt of the store. This updatedAt is set internally during store updates.", + "format": "date-time", + "readOnly": true + }, + "paymentDetails": { + "description": "The payment details of the store (if setup)", + "nullable": true, + "$id": "https://godaddy.com/schemas/commerce/store-payment-details.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Details", + "type": "object", + "properties": { + "currency": { + "description": "The primary transaction currency for this store.", + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "minLength": 3, + "maxLength": 3 + }, + "acquirer": { + "description": "The acquirer for this merchant.", + "$id": "https://godaddy.com/schemas/commerce/store-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "externalStoreId": { + "type": "string", + "description": "MID (merchantId) assigned to the store by the acquirer.", + "maxLength": 64 + }, + "gatewayStoreId": { + "type": "string", + "description": "ID assigned to the store by the gateway (some gateways assign their own IDs). This field will typically not be available when the business is initially created in the Poynt system. Once that information is passed to the gateway, they will provide their ID.", + "maxLength": 64 + }, + "processor": { + "description": "The processor for this merchant. If this field is left blank it is assumed that the processor is the acquirer itself or CreditCall that happens to be our primary gateway.", + "$id": "https://godaddy.com/schemas/commerce/store-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "processorAdapterId": { + "type": "string", + "deprecated": true, + "description": "The processor adapter id for the store." + }, + "processorData": { + "description": "The processor data for the store.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "externalStoreId" + ] + }, + "ownerId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + "description": "Store represent a brand under a business", + "required": [ + "displayName", + "businessId" + ] } }, "responses": { "200": { "description": "Store Created", "schema": { - "$ref": "./models/Store.yaml" + "$id": "https://godaddy.com/schemas/commerce/store.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store", + "type": "object", + "properties": { + "address": { + "description": "The store's address. This may or may not be different from business address.", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "attributes": { + "description": "A name/value pair list that could be persisted and later retrieved.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "createdAt": { + "type": "string", + "description": "The createdAt of the store. This createdAt is generated internally during create store.", + "format": "date-time", + "readOnly": true + }, + "defaultChannelId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "defaultRetailChannelId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "displayName": { + "type": "string", + "description": "The store name (used in various displays). It is recommended to pick a different name for each store in the business.", + "maxLength": 64 + }, + "emailAddress": { + "type": "string", + "maxLength": 64, + "description": "The email address of the store." + }, + "governmentIds": { + "maxItems": 10, + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/store-government-id.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernmentId", + "description": "GovernmentId details", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "The time (in ISO-8601 format) at which the application was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "governmentId": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The government id. E.g. '123456789'" + }, + "type": { + "type": "string", + "minLength": 1, + "maxLength": 32, + "description": "The type of government id. E.g. 'drivers-license'" + }, + "updatedAt": { + "type": "string", + "description": "The time (in ISO-8601 format) at which the application was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "required": [ + "governmentId", + "type" + ] + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "businessId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "phone": { + "description": "The store's phone. This may or may not be different from business phone.", + "$id": "https://godaddy.com/schemas/commerce/store/phone-with-type.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Phone with Type", + "type": "object", + "properties": { + "details": { + "description": "Phone number details", + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "type": { + "description": "Phone type", + "$id": "https://godaddy.com/schemas/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + } + }, + "required": [ + "details" + ] + }, + "status": { + "type": "string", + "default": "ACTIVE", + "enum": [ + "ACTIVE", + "DISABLED", + "REMOVED" + ], + "description": "The status of the store." + }, + "subscribedBundles": { + "description": "The list of bundles this store has subscribed to.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/store-bundled-features.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bundled Features", + "description": "This is the base object for the list of features a business/store has subscribed to.", + "deprecated": true, + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "featureConfig": { + "description": "Optional configs for each feature in the list.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "featureList": { + "description": "List of features the bundle contains.", + "maxItems": 80, + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "description": "Name of bundle.", + "maxLength": 64 + }, + "type": { + "type": "string", + "description": "The type of the bundle." + }, + "updatedAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "required": [ + "featureList", + "id", + "name" + ] + } + }, + "timezone": { + "type": "string", + "description": "The timezone of the store.", + "maxLength": 64 + }, + "updatedAt": { + "type": "string", + "description": "The updatedAt of the store. This updatedAt is set internally during store updates.", + "format": "date-time", + "readOnly": true + }, + "paymentDetails": { + "description": "The payment details of the store (if setup)", + "nullable": true, + "$id": "https://godaddy.com/schemas/commerce/store-payment-details.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Details", + "type": "object", + "properties": { + "currency": { + "description": "The primary transaction currency for this store.", + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "minLength": 3, + "maxLength": 3 + }, + "acquirer": { + "description": "The acquirer for this merchant.", + "$id": "https://godaddy.com/schemas/commerce/store-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "externalStoreId": { + "type": "string", + "description": "MID (merchantId) assigned to the store by the acquirer.", + "maxLength": 64 + }, + "gatewayStoreId": { + "type": "string", + "description": "ID assigned to the store by the gateway (some gateways assign their own IDs). This field will typically not be available when the business is initially created in the Poynt system. Once that information is passed to the gateway, they will provide their ID.", + "maxLength": 64 + }, + "processor": { + "description": "The processor for this merchant. If this field is left blank it is assumed that the processor is the acquirer itself or CreditCall that happens to be our primary gateway.", + "$id": "https://godaddy.com/schemas/commerce/store-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "processorAdapterId": { + "type": "string", + "deprecated": true, + "description": "The processor adapter id for the store." + }, + "processorData": { + "description": "The processor data for the store.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "externalStoreId" + ] + }, + "ownerId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + "description": "Store represent a brand under a business", + "required": [ + "displayName", + "businessId" + ] } }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.store:create"] + "scopes": [ + "commerce.store:create" + ] }, { "operationId": "getStoresByBusinessId", @@ -66,7 +1355,11 @@ "required": true, "description": "Business ID", "schema": { - "$ref": "./common-types/v1/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -123,14 +1416,833 @@ "200": { "description": "List of stores found", "schema": { - "$ref": "./models/StoreList.yaml" + "$id": "https://godaddy.com/schemas/commerce/store-list.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store List", + "type": "object", + "description": "Resource representing a list of Stores", + "properties": { + "items": { + "description": "Array containing the current page of Stores", + "items": { + "$id": "https://godaddy.com/schemas/commerce/store.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store", + "type": "object", + "properties": { + "address": { + "description": "The store's address. This may or may not be different from business address.", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "attributes": { + "description": "A name/value pair list that could be persisted and later retrieved.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "createdAt": { + "type": "string", + "description": "The createdAt of the store. This createdAt is generated internally during create store.", + "format": "date-time", + "readOnly": true + }, + "defaultChannelId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "defaultRetailChannelId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "displayName": { + "type": "string", + "description": "The store name (used in various displays). It is recommended to pick a different name for each store in the business.", + "maxLength": 64 + }, + "emailAddress": { + "type": "string", + "maxLength": 64, + "description": "The email address of the store." + }, + "governmentIds": { + "maxItems": 10, + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/store-government-id.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernmentId", + "description": "GovernmentId details", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "The time (in ISO-8601 format) at which the application was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "governmentId": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The government id. E.g. '123456789'" + }, + "type": { + "type": "string", + "minLength": 1, + "maxLength": 32, + "description": "The type of government id. E.g. 'drivers-license'" + }, + "updatedAt": { + "type": "string", + "description": "The time (in ISO-8601 format) at which the application was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "required": [ + "governmentId", + "type" + ] + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "businessId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "phone": { + "description": "The store's phone. This may or may not be different from business phone.", + "$id": "https://godaddy.com/schemas/commerce/store/phone-with-type.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Phone with Type", + "type": "object", + "properties": { + "details": { + "description": "Phone number details", + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "type": { + "description": "Phone type", + "$id": "https://godaddy.com/schemas/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + } + }, + "required": [ + "details" + ] + }, + "status": { + "type": "string", + "default": "ACTIVE", + "enum": [ + "ACTIVE", + "DISABLED", + "REMOVED" + ], + "description": "The status of the store." + }, + "subscribedBundles": { + "description": "The list of bundles this store has subscribed to.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/store-bundled-features.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bundled Features", + "description": "This is the base object for the list of features a business/store has subscribed to.", + "deprecated": true, + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "featureConfig": { + "description": "Optional configs for each feature in the list.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "featureList": { + "description": "List of features the bundle contains.", + "maxItems": 80, + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "description": "Name of bundle.", + "maxLength": 64 + }, + "type": { + "type": "string", + "description": "The type of the bundle." + }, + "updatedAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "required": [ + "featureList", + "id", + "name" + ] + } + }, + "timezone": { + "type": "string", + "description": "The timezone of the store.", + "maxLength": 64 + }, + "updatedAt": { + "type": "string", + "description": "The updatedAt of the store. This updatedAt is set internally during store updates.", + "format": "date-time", + "readOnly": true + }, + "paymentDetails": { + "description": "The payment details of the store (if setup)", + "nullable": true, + "$id": "https://godaddy.com/schemas/commerce/store-payment-details.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Details", + "type": "object", + "properties": { + "currency": { + "description": "The primary transaction currency for this store.", + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "minLength": 3, + "maxLength": 3 + }, + "acquirer": { + "description": "The acquirer for this merchant.", + "$id": "https://godaddy.com/schemas/commerce/store-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "externalStoreId": { + "type": "string", + "description": "MID (merchantId) assigned to the store by the acquirer.", + "maxLength": 64 + }, + "gatewayStoreId": { + "type": "string", + "description": "ID assigned to the store by the gateway (some gateways assign their own IDs). This field will typically not be available when the business is initially created in the Poynt system. Once that information is passed to the gateway, they will provide their ID.", + "maxLength": 64 + }, + "processor": { + "description": "The processor for this merchant. If this field is left blank it is assumed that the processor is the acquirer itself or CreditCall that happens to be our primary gateway.", + "$id": "https://godaddy.com/schemas/commerce/store-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "processorAdapterId": { + "type": "string", + "deprecated": true, + "description": "The processor adapter id for the store." + }, + "processorData": { + "description": "The processor data for the store.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "externalStoreId" + ] + }, + "ownerId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + "description": "Store represent a brand under a business", + "required": [ + "displayName", + "businessId" + ] + }, + "type": "array" + }, + "totalItems": { + "description": "Total number of Stores matching the search criteria. Returned only when totalRequired is set to true.", + "type": "integer" + }, + "totalPages": { + "description": "Total number of pages matching the search criteria. Returned only when totalRequired is set to true.", + "type": "integer" + }, + "links": { + "description": "Array of HATEOAS link relations that should be used to navigate across pages of Stores", + "$id": "https://godaddy.com/schemas/commerce/link.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "type": "array", + "x-auto-generated": true, + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } } }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.store:create"] + "scopes": [ + "commerce.store:create" + ] }, { "operationId": "getStoreById", @@ -155,7 +2267,11 @@ "required": true, "description": "Store ID", "schema": { - "$ref": "./common-types/v1/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -175,14 +2291,759 @@ "200": { "description": "Store Found", "schema": { - "$ref": "./models/Store.yaml" + "$id": "https://godaddy.com/schemas/commerce/store.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store", + "type": "object", + "properties": { + "address": { + "description": "The store's address. This may or may not be different from business address.", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "attributes": { + "description": "A name/value pair list that could be persisted and later retrieved.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "createdAt": { + "type": "string", + "description": "The createdAt of the store. This createdAt is generated internally during create store.", + "format": "date-time", + "readOnly": true + }, + "defaultChannelId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "defaultRetailChannelId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "displayName": { + "type": "string", + "description": "The store name (used in various displays). It is recommended to pick a different name for each store in the business.", + "maxLength": 64 + }, + "emailAddress": { + "type": "string", + "maxLength": 64, + "description": "The email address of the store." + }, + "governmentIds": { + "maxItems": 10, + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/store-government-id.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernmentId", + "description": "GovernmentId details", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "The time (in ISO-8601 format) at which the application was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "governmentId": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The government id. E.g. '123456789'" + }, + "type": { + "type": "string", + "minLength": 1, + "maxLength": 32, + "description": "The type of government id. E.g. 'drivers-license'" + }, + "updatedAt": { + "type": "string", + "description": "The time (in ISO-8601 format) at which the application was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "required": [ + "governmentId", + "type" + ] + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "businessId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "phone": { + "description": "The store's phone. This may or may not be different from business phone.", + "$id": "https://godaddy.com/schemas/commerce/store/phone-with-type.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Phone with Type", + "type": "object", + "properties": { + "details": { + "description": "Phone number details", + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "type": { + "description": "Phone type", + "$id": "https://godaddy.com/schemas/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + } + }, + "required": [ + "details" + ] + }, + "status": { + "type": "string", + "default": "ACTIVE", + "enum": [ + "ACTIVE", + "DISABLED", + "REMOVED" + ], + "description": "The status of the store." + }, + "subscribedBundles": { + "description": "The list of bundles this store has subscribed to.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/store-bundled-features.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bundled Features", + "description": "This is the base object for the list of features a business/store has subscribed to.", + "deprecated": true, + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "featureConfig": { + "description": "Optional configs for each feature in the list.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "featureList": { + "description": "List of features the bundle contains.", + "maxItems": 80, + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "description": "Name of bundle.", + "maxLength": 64 + }, + "type": { + "type": "string", + "description": "The type of the bundle." + }, + "updatedAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "required": [ + "featureList", + "id", + "name" + ] + } + }, + "timezone": { + "type": "string", + "description": "The timezone of the store.", + "maxLength": 64 + }, + "updatedAt": { + "type": "string", + "description": "The updatedAt of the store. This updatedAt is set internally during store updates.", + "format": "date-time", + "readOnly": true + }, + "paymentDetails": { + "description": "The payment details of the store (if setup)", + "nullable": true, + "$id": "https://godaddy.com/schemas/commerce/store-payment-details.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Details", + "type": "object", + "properties": { + "currency": { + "description": "The primary transaction currency for this store.", + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "minLength": 3, + "maxLength": 3 + }, + "acquirer": { + "description": "The acquirer for this merchant.", + "$id": "https://godaddy.com/schemas/commerce/store-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "externalStoreId": { + "type": "string", + "description": "MID (merchantId) assigned to the store by the acquirer.", + "maxLength": 64 + }, + "gatewayStoreId": { + "type": "string", + "description": "ID assigned to the store by the gateway (some gateways assign their own IDs). This field will typically not be available when the business is initially created in the Poynt system. Once that information is passed to the gateway, they will provide their ID.", + "maxLength": 64 + }, + "processor": { + "description": "The processor for this merchant. If this field is left blank it is assumed that the processor is the acquirer itself or CreditCall that happens to be our primary gateway.", + "$id": "https://godaddy.com/schemas/commerce/store-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "processorAdapterId": { + "type": "string", + "deprecated": true, + "description": "The processor adapter id for the store." + }, + "processorData": { + "description": "The processor data for the store.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "externalStoreId" + ] + }, + "ownerId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + "description": "Store represent a brand under a business", + "required": [ + "displayName", + "businessId" + ] } }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.store:read"] + "scopes": [ + "commerce.store:read" + ] }, { "operationId": "updateStore", @@ -207,7 +3068,11 @@ "required": true, "description": "Store ID", "schema": { - "$ref": "./common-types/v1/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -227,24 +3092,830 @@ "required": false, "contentType": "application/json", "schema": { - "$ref": "./common-types/v1/patch-request.json" + "$id": "https://godaddy.com/schemas/common/patch-request.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "title": "Patch Request", + "description": "An array of JSON patch objects to apply partial updates to resources.", + "items": { + "$id": "https://godaddy.com/schemas/common/patch.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Patch", + "description": "The JSON patch object to apply partial updates to resources.", + "properties": { + "op": { + "type": "string", + "description": "The operation to complete.", + "enum": [ + "add", + "remove", + "replace", + "move", + "copy", + "test" + ] + }, + "path": { + "type": "string", + "description": "The JSON pointer to the target document location at which to complete the operation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ], + "nullable": true, + "description": "The value to apply. The `remove` operation does not require a value." + }, + "from": { + "type": "string", + "description": "The JSON pointer to the target document location from which to move the value. Required for the `move` operation." + } + }, + "required": [ + "op" + ] + } } }, "responses": { "200": { "description": "Store updated", "schema": { - "$ref": "./models/Store.yaml" + "$id": "https://godaddy.com/schemas/commerce/store.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store", + "type": "object", + "properties": { + "address": { + "description": "The store's address. This may or may not be different from business address.", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "attributes": { + "description": "A name/value pair list that could be persisted and later retrieved.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "createdAt": { + "type": "string", + "description": "The createdAt of the store. This createdAt is generated internally during create store.", + "format": "date-time", + "readOnly": true + }, + "defaultChannelId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "defaultRetailChannelId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "displayName": { + "type": "string", + "description": "The store name (used in various displays). It is recommended to pick a different name for each store in the business.", + "maxLength": 64 + }, + "emailAddress": { + "type": "string", + "maxLength": 64, + "description": "The email address of the store." + }, + "governmentIds": { + "maxItems": 10, + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/store-government-id.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernmentId", + "description": "GovernmentId details", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "The time (in ISO-8601 format) at which the application was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "governmentId": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The government id. E.g. '123456789'" + }, + "type": { + "type": "string", + "minLength": 1, + "maxLength": 32, + "description": "The type of government id. E.g. 'drivers-license'" + }, + "updatedAt": { + "type": "string", + "description": "The time (in ISO-8601 format) at which the application was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "required": [ + "governmentId", + "type" + ] + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "businessId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "phone": { + "description": "The store's phone. This may or may not be different from business phone.", + "$id": "https://godaddy.com/schemas/commerce/store/phone-with-type.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Phone with Type", + "type": "object", + "properties": { + "details": { + "description": "Phone number details", + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "type": { + "description": "Phone type", + "$id": "https://godaddy.com/schemas/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + } + }, + "required": [ + "details" + ] + }, + "status": { + "type": "string", + "default": "ACTIVE", + "enum": [ + "ACTIVE", + "DISABLED", + "REMOVED" + ], + "description": "The status of the store." + }, + "subscribedBundles": { + "description": "The list of bundles this store has subscribed to.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/store-bundled-features.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bundled Features", + "description": "This is the base object for the list of features a business/store has subscribed to.", + "deprecated": true, + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "featureConfig": { + "description": "Optional configs for each feature in the list.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "featureList": { + "description": "List of features the bundle contains.", + "maxItems": 80, + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "description": "Name of bundle.", + "maxLength": 64 + }, + "type": { + "type": "string", + "description": "The type of the bundle." + }, + "updatedAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "required": [ + "featureList", + "id", + "name" + ] + } + }, + "timezone": { + "type": "string", + "description": "The timezone of the store.", + "maxLength": 64 + }, + "updatedAt": { + "type": "string", + "description": "The updatedAt of the store. This updatedAt is set internally during store updates.", + "format": "date-time", + "readOnly": true + }, + "paymentDetails": { + "description": "The payment details of the store (if setup)", + "nullable": true, + "$id": "https://godaddy.com/schemas/commerce/store-payment-details.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Details", + "type": "object", + "properties": { + "currency": { + "description": "The primary transaction currency for this store.", + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "minLength": 3, + "maxLength": 3 + }, + "acquirer": { + "description": "The acquirer for this merchant.", + "$id": "https://godaddy.com/schemas/commerce/store-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "externalStoreId": { + "type": "string", + "description": "MID (merchantId) assigned to the store by the acquirer.", + "maxLength": 64 + }, + "gatewayStoreId": { + "type": "string", + "description": "ID assigned to the store by the gateway (some gateways assign their own IDs). This field will typically not be available when the business is initially created in the Poynt system. Once that information is passed to the gateway, they will provide their ID.", + "maxLength": 64 + }, + "processor": { + "description": "The processor for this merchant. If this field is left blank it is assumed that the processor is the acquirer itself or CreditCall that happens to be our primary gateway.", + "$id": "https://godaddy.com/schemas/commerce/store-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "processorAdapterId": { + "type": "string", + "deprecated": true, + "description": "The processor adapter id for the store." + }, + "processorData": { + "description": "The processor data for the store.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "externalStoreId" + ] + }, + "ownerId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + "description": "Store represent a brand under a business", + "required": [ + "displayName", + "businessId" + ] } }, "404": { "description": "Store Not Found" }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.store:update"] + "scopes": [ + "commerce.store:update" + ] }, { "operationId": "updateGovernmentIds", @@ -269,7 +3940,11 @@ "required": true, "description": "Store ID", "schema": { - "$ref": "./common-types/v1/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } } ], @@ -277,21 +3952,803 @@ "required": false, "contentType": "application/json", "schema": { - "$ref": "#/components/schemas/governmentIdList" + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/store-government-id.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernmentId", + "description": "GovernmentId details", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "The time (in ISO-8601 format) at which the application was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "governmentId": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The government id. E.g. '123456789'" + }, + "type": { + "type": "string", + "minLength": 1, + "maxLength": 32, + "description": "The type of government id. E.g. 'drivers-license'" + }, + "updatedAt": { + "type": "string", + "description": "The time (in ISO-8601 format) at which the application was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "required": [ + "governmentId", + "type" + ] + } } }, "responses": { "200": { "description": "Government IDs updated", "schema": { - "$ref": "./models/Store.yaml" + "$id": "https://godaddy.com/schemas/commerce/store.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store", + "type": "object", + "properties": { + "address": { + "description": "The store's address. This may or may not be different from business address.", + "$id": "https://godaddy.com/schemas/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schemas/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "attributes": { + "description": "A name/value pair list that could be persisted and later retrieved.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "createdAt": { + "type": "string", + "description": "The createdAt of the store. This createdAt is generated internally during create store.", + "format": "date-time", + "readOnly": true + }, + "defaultChannelId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "defaultRetailChannelId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "displayName": { + "type": "string", + "description": "The store name (used in various displays). It is recommended to pick a different name for each store in the business.", + "maxLength": 64 + }, + "emailAddress": { + "type": "string", + "maxLength": 64, + "description": "The email address of the store." + }, + "governmentIds": { + "maxItems": 10, + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/store-government-id.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GovernmentId", + "description": "GovernmentId details", + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "The time (in ISO-8601 format) at which the application was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "governmentId": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The government id. E.g. '123456789'" + }, + "type": { + "type": "string", + "minLength": 1, + "maxLength": 32, + "description": "The type of government id. E.g. 'drivers-license'" + }, + "updatedAt": { + "type": "string", + "description": "The time (in ISO-8601 format) at which the application was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "required": [ + "governmentId", + "type" + ] + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "businessId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "phone": { + "description": "The store's phone. This may or may not be different from business phone.", + "$id": "https://godaddy.com/schemas/commerce/store/phone-with-type.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Phone with Type", + "type": "object", + "properties": { + "details": { + "description": "Phone number details", + "$id": "https://godaddy.com/schemas/common/phone.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Phone", + "properties": { + "countryCode": { + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 3, + "pattern": "^[0-9]{1,3}?$" + }, + "nationalNumber": { + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).", + "minLength": 1, + "maxLength": 14, + "pattern": "^[0-9]{1,14}?$" + }, + "extensionNumber": { + "type": "string", + "description": "The extension number.", + "minLength": 1, + "maxLength": 15, + "pattern": "^[0-9]{1,15}?$" + } + }, + "required": [ + "countryCode", + "nationalNumber" + ] + }, + "type": { + "description": "Phone type", + "$id": "https://godaddy.com/schemas/common/phone-type.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Phone type", + "enum": [ + "FAX", + "HOME", + "MOBILE", + "OTHER", + "WORK" + ] + } + }, + "required": [ + "details" + ] + }, + "status": { + "type": "string", + "default": "ACTIVE", + "enum": [ + "ACTIVE", + "DISABLED", + "REMOVED" + ], + "description": "The status of the store." + }, + "subscribedBundles": { + "description": "The list of bundles this store has subscribed to.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/store-bundled-features.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Bundled Features", + "description": "This is the base object for the list of features a business/store has subscribed to.", + "deprecated": true, + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was created. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + }, + "featureConfig": { + "description": "Optional configs for each feature in the list.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "featureList": { + "description": "List of features the bundle contains.", + "maxItems": 80, + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string", + "description": "Name of bundle.", + "maxLength": 64 + }, + "type": { + "type": "string", + "description": "The type of the bundle." + }, + "updatedAt": { + "type": "string", + "description": "This is a response only field. The time (in ISO-8601 format) at which the bundle was updated. E.g. 2014-09-11T23:14:44Z.", + "format": "date-time", + "readOnly": true + } + }, + "required": [ + "featureList", + "id", + "name" + ] + } + }, + "timezone": { + "type": "string", + "description": "The timezone of the store.", + "maxLength": 64 + }, + "updatedAt": { + "type": "string", + "description": "The updatedAt of the store. This updatedAt is set internally during store updates.", + "format": "date-time", + "readOnly": true + }, + "paymentDetails": { + "description": "The payment details of the store (if setup)", + "nullable": true, + "$id": "https://godaddy.com/schemas/commerce/store-payment-details.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Details", + "type": "object", + "properties": { + "currency": { + "description": "The primary transaction currency for this store.", + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "minLength": 3, + "maxLength": 3 + }, + "acquirer": { + "description": "The acquirer for this merchant.", + "$id": "https://godaddy.com/schemas/commerce/store-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "externalStoreId": { + "type": "string", + "description": "MID (merchantId) assigned to the store by the acquirer.", + "maxLength": 64 + }, + "gatewayStoreId": { + "type": "string", + "description": "ID assigned to the store by the gateway (some gateways assign their own IDs). This field will typically not be available when the business is initially created in the Poynt system. Once that information is passed to the gateway, they will provide their ID.", + "maxLength": 64 + }, + "processor": { + "description": "The processor for this merchant. If this field is left blank it is assumed that the processor is the acquirer itself or CreditCall that happens to be our primary gateway.", + "$id": "https://godaddy.com/schemas/commerce/store-processor.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Store Processor", + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "processorAdapterId": { + "type": "string", + "deprecated": true, + "description": "The processor adapter id for the store." + }, + "processorData": { + "description": "The processor data for the store.", + "$id": "https://godaddy.com/schemas/commerce/store/dictionary.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + } + }, + "required": [ + "externalStoreId" + ] + }, + "ownerId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + "description": "Store represent a brand under a business", + "required": [ + "displayName", + "businessId" + ] } }, "404": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.store:update"] + "scopes": [ + "commerce.store:update" + ] }, { "operationId": "updateStoreAttribute", @@ -316,7 +4773,11 @@ "required": true, "description": "Store ID", "schema": { - "$ref": "./common-types/v1/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -333,7 +4794,19 @@ "required": false, "contentType": "application/json", "schema": { - "$ref": "#/components/schemas/attributeUpdateRequest" + "properties": { + "value": { + "type": "string", + "description": "The attribute value." + }, + "ttl": { + "type": "integer", + "description": "The expiration time of an ephemeral attribute." + } + }, + "required": [ + "value" + ] } }, "responses": { @@ -341,13 +4814,413 @@ "description": "Store Attribute updated" }, "404": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.store:update"] + "scopes": [ + "commerce.store:update" + ] }, { "operationId": "getStoreAttribute", @@ -372,7 +5245,11 @@ "required": true, "description": "Store ID", "schema": { - "$ref": "./common-types/v1/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -390,13 +5267,413 @@ "description": "Store Attribute Found" }, "404": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.store:read"] + "scopes": [ + "commerce.store:read" + ] }, { "operationId": "deleteStoreAttribute", @@ -421,7 +5698,11 @@ "required": true, "description": "Store ID", "schema": { - "$ref": "./common-types/v1/uuid.json" + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" } }, { @@ -448,13 +5729,413 @@ "description": "Store Attribute deleted" }, "404": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.store:update"] + "scopes": [ + "commerce.store:update" + ] } ] -} +} \ No newline at end of file diff --git a/src/cli/schemas/api/subscriptions.json b/src/cli/schemas/api/subscriptions.json new file mode 100644 index 0000000..9d7c86e --- /dev/null +++ b/src/cli/schemas/api/subscriptions.json @@ -0,0 +1,4691 @@ +{ + "name": "subscriptions", + "title": "Commerce Subscription API", + "description": "This API is capable of recording and obtaining commerce subscription information", + "version": "1.1.0", + "baseUrl": "https://api.godaddy.com/v1/commerce", + "endpoints": [ + { + "operationId": "createPlan", + "method": "POST", + "path": "/plans", + "summary": "Create Subscription Plan", + "description": "Create Subscription Plan", + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "required": false, + "description": "Request ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/subscription-plan.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Subscription Plan", + "description": "Resource representing a Subscription Plan that can be purchased by a customer. Supports free plans, fixed recurring pricing, and trial periods.\n", + "type": "object", + "properties": { + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The reference key of the subscription plan. For GODADDY_APP plans, unique per applicationId.\n", + "maxLength": 100 + }, + "displayName": { + "type": "string", + "description": "The display name of the subscription plan shown to customers", + "maxLength": 200 + }, + "description": { + "type": "string", + "description": "Detailed description of what the subscription plan provides", + "maxLength": 1000 + }, + "status": { + "type": "string", + "description": "The status of the subscription plan. E.g. ACTIVE, DRAFT, DEPRECATED, DISCONTINUED", + "default": "ACTIVE", + "x-server-pattern": "^(ACTIVE|DRAFT|DEPRECATED|DISCONTINUED)$" + }, + "applicationId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "billingReferenceId": { + "type": "string", + "description": "The identifier for this plan in the external billing system used for checkout and payment processing. Today this is a Poynt Billing plan ID.\n", + "maxLength": 100 + }, + "billingProvider": { + "type": "string", + "description": "Identifies which external billing system the billingReferenceId belongs to. Acceptable values: POYNT_BILLING, GODADDY_ECOMM.\n", + "x-server-pattern": "^(POYNT_BILLING|GODADDY_ECOMM)$" + }, + "pricing": { + "description": "The pricing configuration for this plan. Uses pricingModel as a discriminator to determine the applicable pricing schema.\n", + "$id": "https://godaddy.com/schemas/commerce/subscriptions/pricing-model.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Pricing Model", + "discriminator": { + "propertyName": "pricingModel", + "mapping": { + "FREE": "./FreePricing.yaml", + "FIXED_RECURRING": "./FixedRecurringPricing.yaml" + } + }, + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/free-pricing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Free Pricing", + "description": "Pricing configuration for a free plan. No charge, entitlement only. No billing cycle, price, or trial fields are applicable.\n", + "type": "object", + "properties": { + "pricingModel": { + "type": "string", + "const": "FREE" + } + }, + "required": [ + "pricingModel" + ], + "additionalProperties": false + }, + { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/fixed-recurring-pricing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fixed Recurring Pricing", + "description": "Pricing configuration for a fixed recurring plan. A fixed amount is charged on a recurring billing cycle.\n", + "type": "object", + "properties": { + "pricingModel": { + "type": "string", + "const": "FIXED_RECURRING" + }, + "billingCycle": { + "type": "string", + "description": "The recurring interval at which the plan is billed.", + "x-server-pattern": "^(WEEKLY|MONTHLY|YEARLY)$" + }, + "price": { + "description": "The price for this plan. Value must be > 0.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money", + "properties": { + "currencyCode": { + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "format": "int64", + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "trialDays": { + "type": "integer", + "description": "Number of days the customer gets free access before the first charge. Payment info is collected upfront. Re-subscriptions skip the trial.\n", + "minimum": 1, + "maximum": 365 + } + }, + "required": [ + "pricingModel", + "billingCycle", + "price" + ] + } + ] + }, + "countryCode": { + "description": "ISO 3166-1 alpha-2 country code where this plan is available. Optional — if omitted, the plan is available in all countries. For country-specific pricing, create separate plans per country.\n", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "marketingData": { + "type": "object", + "description": "Marketing information for the subscription plan", + "properties": { + "headline": { + "type": "string", + "description": "Main marketing headline for the plan", + "maxLength": 200 + }, + "shortDescription": { + "type": "string", + "description": "Short marketing description (1-2 sentences)", + "maxLength": 500 + }, + "features": { + "type": "array", + "description": "List of marketing features to highlight", + "items": { + "type": "string" + } + } + }, + "additionalProperties": true + }, + "createdAt": { + "description": "The time (ISO-8601) at which the plan was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The time (ISO-8601) at which the plan was last updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name", + "pricing" + ] + } + }, + "responses": { + "201": { + "description": "Plan Created", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/subscription-plan.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Subscription Plan", + "description": "Resource representing a Subscription Plan that can be purchased by a customer. Supports free plans, fixed recurring pricing, and trial periods.\n", + "type": "object", + "properties": { + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The reference key of the subscription plan. For GODADDY_APP plans, unique per applicationId.\n", + "maxLength": 100 + }, + "displayName": { + "type": "string", + "description": "The display name of the subscription plan shown to customers", + "maxLength": 200 + }, + "description": { + "type": "string", + "description": "Detailed description of what the subscription plan provides", + "maxLength": 1000 + }, + "status": { + "type": "string", + "description": "The status of the subscription plan. E.g. ACTIVE, DRAFT, DEPRECATED, DISCONTINUED", + "default": "ACTIVE", + "x-server-pattern": "^(ACTIVE|DRAFT|DEPRECATED|DISCONTINUED)$" + }, + "applicationId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "billingReferenceId": { + "type": "string", + "description": "The identifier for this plan in the external billing system used for checkout and payment processing. Today this is a Poynt Billing plan ID.\n", + "maxLength": 100 + }, + "billingProvider": { + "type": "string", + "description": "Identifies which external billing system the billingReferenceId belongs to. Acceptable values: POYNT_BILLING, GODADDY_ECOMM.\n", + "x-server-pattern": "^(POYNT_BILLING|GODADDY_ECOMM)$" + }, + "pricing": { + "description": "The pricing configuration for this plan. Uses pricingModel as a discriminator to determine the applicable pricing schema.\n", + "$id": "https://godaddy.com/schemas/commerce/subscriptions/pricing-model.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Pricing Model", + "discriminator": { + "propertyName": "pricingModel", + "mapping": { + "FREE": "./FreePricing.yaml", + "FIXED_RECURRING": "./FixedRecurringPricing.yaml" + } + }, + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/free-pricing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Free Pricing", + "description": "Pricing configuration for a free plan. No charge, entitlement only. No billing cycle, price, or trial fields are applicable.\n", + "type": "object", + "properties": { + "pricingModel": { + "type": "string", + "const": "FREE" + } + }, + "required": [ + "pricingModel" + ], + "additionalProperties": false + }, + { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/fixed-recurring-pricing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fixed Recurring Pricing", + "description": "Pricing configuration for a fixed recurring plan. A fixed amount is charged on a recurring billing cycle.\n", + "type": "object", + "properties": { + "pricingModel": { + "type": "string", + "const": "FIXED_RECURRING" + }, + "billingCycle": { + "type": "string", + "description": "The recurring interval at which the plan is billed.", + "x-server-pattern": "^(WEEKLY|MONTHLY|YEARLY)$" + }, + "price": { + "description": "The price for this plan. Value must be > 0.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money", + "properties": { + "currencyCode": { + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "format": "int64", + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "trialDays": { + "type": "integer", + "description": "Number of days the customer gets free access before the first charge. Payment info is collected upfront. Re-subscriptions skip the trial.\n", + "minimum": 1, + "maximum": 365 + } + }, + "required": [ + "pricingModel", + "billingCycle", + "price" + ] + } + ] + }, + "countryCode": { + "description": "ISO 3166-1 alpha-2 country code where this plan is available. Optional — if omitted, the plan is available in all countries. For country-specific pricing, create separate plans per country.\n", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "marketingData": { + "type": "object", + "description": "Marketing information for the subscription plan", + "properties": { + "headline": { + "type": "string", + "description": "Main marketing headline for the plan", + "maxLength": 200 + }, + "shortDescription": { + "type": "string", + "description": "Short marketing description (1-2 sentences)", + "maxLength": 500 + }, + "features": { + "type": "array", + "description": "List of marketing features to highlight", + "items": { + "type": "string" + } + } + }, + "additionalProperties": true + }, + "createdAt": { + "description": "The time (ISO-8601) at which the plan was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The time (ISO-8601) at which the plan was last updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name", + "pricing" + ] + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.subscription-plan:create" + ] + }, + { + "operationId": "getPlans", + "method": "GET", + "path": "/plans", + "summary": "Get Subscription Plans", + "description": "Retrieve the subscription plans by params", + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "required": false, + "description": "Request ID", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "applicationId", + "in": "query", + "required": true, + "description": "Godaddy Platform Application ID (required)", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "status", + "in": "query", + "required": false, + "description": "Status of the subscription plan", + "schema": { + "type": "string", + "description": "The status of the subscription plan. E.g. ACTIVE, DRAFT, DEPRECATED, DISCONTINUED.", + "default": "ACTIVE", + "pattern": "^(ACTIVE|DRAFT|DEPRECATED|DISCONTINUED)$" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "totalRequired", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Plans Found", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/subscription-plan-list.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Subscription Plan List", + "type": "object", + "description": "Resource representing a list of subscription plans", + "properties": { + "items": { + "description": "Array containing the current page of subscription plans", + "items": { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/subscription-plan.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Subscription Plan", + "description": "Resource representing a Subscription Plan that can be purchased by a customer. Supports free plans, fixed recurring pricing, and trial periods.\n", + "type": "object", + "properties": { + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The reference key of the subscription plan. For GODADDY_APP plans, unique per applicationId.\n", + "maxLength": 100 + }, + "displayName": { + "type": "string", + "description": "The display name of the subscription plan shown to customers", + "maxLength": 200 + }, + "description": { + "type": "string", + "description": "Detailed description of what the subscription plan provides", + "maxLength": 1000 + }, + "status": { + "type": "string", + "description": "The status of the subscription plan. E.g. ACTIVE, DRAFT, DEPRECATED, DISCONTINUED", + "default": "ACTIVE", + "x-server-pattern": "^(ACTIVE|DRAFT|DEPRECATED|DISCONTINUED)$" + }, + "applicationId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "billingReferenceId": { + "type": "string", + "description": "The identifier for this plan in the external billing system used for checkout and payment processing. Today this is a Poynt Billing plan ID.\n", + "maxLength": 100 + }, + "billingProvider": { + "type": "string", + "description": "Identifies which external billing system the billingReferenceId belongs to. Acceptable values: POYNT_BILLING, GODADDY_ECOMM.\n", + "x-server-pattern": "^(POYNT_BILLING|GODADDY_ECOMM)$" + }, + "pricing": { + "description": "The pricing configuration for this plan. Uses pricingModel as a discriminator to determine the applicable pricing schema.\n", + "$id": "https://godaddy.com/schemas/commerce/subscriptions/pricing-model.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Pricing Model", + "discriminator": { + "propertyName": "pricingModel", + "mapping": { + "FREE": "./FreePricing.yaml", + "FIXED_RECURRING": "./FixedRecurringPricing.yaml" + } + }, + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/free-pricing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Free Pricing", + "description": "Pricing configuration for a free plan. No charge, entitlement only. No billing cycle, price, or trial fields are applicable.\n", + "type": "object", + "properties": { + "pricingModel": { + "type": "string", + "const": "FREE" + } + }, + "required": [ + "pricingModel" + ], + "additionalProperties": false + }, + { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/fixed-recurring-pricing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fixed Recurring Pricing", + "description": "Pricing configuration for a fixed recurring plan. A fixed amount is charged on a recurring billing cycle.\n", + "type": "object", + "properties": { + "pricingModel": { + "type": "string", + "const": "FIXED_RECURRING" + }, + "billingCycle": { + "type": "string", + "description": "The recurring interval at which the plan is billed.", + "x-server-pattern": "^(WEEKLY|MONTHLY|YEARLY)$" + }, + "price": { + "description": "The price for this plan. Value must be > 0.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money", + "properties": { + "currencyCode": { + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "format": "int64", + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "trialDays": { + "type": "integer", + "description": "Number of days the customer gets free access before the first charge. Payment info is collected upfront. Re-subscriptions skip the trial.\n", + "minimum": 1, + "maximum": 365 + } + }, + "required": [ + "pricingModel", + "billingCycle", + "price" + ] + } + ] + }, + "countryCode": { + "description": "ISO 3166-1 alpha-2 country code where this plan is available. Optional — if omitted, the plan is available in all countries. For country-specific pricing, create separate plans per country.\n", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "marketingData": { + "type": "object", + "description": "Marketing information for the subscription plan", + "properties": { + "headline": { + "type": "string", + "description": "Main marketing headline for the plan", + "maxLength": 200 + }, + "shortDescription": { + "type": "string", + "description": "Short marketing description (1-2 sentences)", + "maxLength": 500 + }, + "features": { + "type": "array", + "description": "List of marketing features to highlight", + "items": { + "type": "string" + } + } + }, + "additionalProperties": true + }, + "createdAt": { + "description": "The time (ISO-8601) at which the plan was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The time (ISO-8601) at which the plan was last updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name", + "pricing" + ] + }, + "type": "array" + }, + "totalItems": { + "description": "Total number of Plans matching the search criteria. Returned only when totalRequired is set to true.", + "type": "integer" + }, + "totalPages": { + "description": "Total number of pages matching the search criteria. Returned only when totalRequired is set to true.", + "type": "integer" + }, + "links": { + "description": "Array of HATEOAS link relations that should be used to navigate across pages of Plans", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.subscription-plan:read" + ] + }, + { + "operationId": "getPlanById", + "method": "GET", + "path": "/plans/{planId}", + "summary": "Get Subscription Plan", + "description": "Retrieve the information of the Subscription Plan by ID.", + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "required": false, + "description": "Request ID", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "planId", + "in": "path", + "required": true, + "description": "The plan ID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Plan Found", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/subscription-plan.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Subscription Plan", + "description": "Resource representing a Subscription Plan that can be purchased by a customer. Supports free plans, fixed recurring pricing, and trial periods.\n", + "type": "object", + "properties": { + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The reference key of the subscription plan. For GODADDY_APP plans, unique per applicationId.\n", + "maxLength": 100 + }, + "displayName": { + "type": "string", + "description": "The display name of the subscription plan shown to customers", + "maxLength": 200 + }, + "description": { + "type": "string", + "description": "Detailed description of what the subscription plan provides", + "maxLength": 1000 + }, + "status": { + "type": "string", + "description": "The status of the subscription plan. E.g. ACTIVE, DRAFT, DEPRECATED, DISCONTINUED", + "default": "ACTIVE", + "x-server-pattern": "^(ACTIVE|DRAFT|DEPRECATED|DISCONTINUED)$" + }, + "applicationId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "billingReferenceId": { + "type": "string", + "description": "The identifier for this plan in the external billing system used for checkout and payment processing. Today this is a Poynt Billing plan ID.\n", + "maxLength": 100 + }, + "billingProvider": { + "type": "string", + "description": "Identifies which external billing system the billingReferenceId belongs to. Acceptable values: POYNT_BILLING, GODADDY_ECOMM.\n", + "x-server-pattern": "^(POYNT_BILLING|GODADDY_ECOMM)$" + }, + "pricing": { + "description": "The pricing configuration for this plan. Uses pricingModel as a discriminator to determine the applicable pricing schema.\n", + "$id": "https://godaddy.com/schemas/commerce/subscriptions/pricing-model.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Pricing Model", + "discriminator": { + "propertyName": "pricingModel", + "mapping": { + "FREE": "./FreePricing.yaml", + "FIXED_RECURRING": "./FixedRecurringPricing.yaml" + } + }, + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/free-pricing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Free Pricing", + "description": "Pricing configuration for a free plan. No charge, entitlement only. No billing cycle, price, or trial fields are applicable.\n", + "type": "object", + "properties": { + "pricingModel": { + "type": "string", + "const": "FREE" + } + }, + "required": [ + "pricingModel" + ], + "additionalProperties": false + }, + { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/fixed-recurring-pricing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fixed Recurring Pricing", + "description": "Pricing configuration for a fixed recurring plan. A fixed amount is charged on a recurring billing cycle.\n", + "type": "object", + "properties": { + "pricingModel": { + "type": "string", + "const": "FIXED_RECURRING" + }, + "billingCycle": { + "type": "string", + "description": "The recurring interval at which the plan is billed.", + "x-server-pattern": "^(WEEKLY|MONTHLY|YEARLY)$" + }, + "price": { + "description": "The price for this plan. Value must be > 0.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money", + "properties": { + "currencyCode": { + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "format": "int64", + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "trialDays": { + "type": "integer", + "description": "Number of days the customer gets free access before the first charge. Payment info is collected upfront. Re-subscriptions skip the trial.\n", + "minimum": 1, + "maximum": 365 + } + }, + "required": [ + "pricingModel", + "billingCycle", + "price" + ] + } + ] + }, + "countryCode": { + "description": "ISO 3166-1 alpha-2 country code where this plan is available. Optional — if omitted, the plan is available in all countries. For country-specific pricing, create separate plans per country.\n", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "marketingData": { + "type": "object", + "description": "Marketing information for the subscription plan", + "properties": { + "headline": { + "type": "string", + "description": "Main marketing headline for the plan", + "maxLength": 200 + }, + "shortDescription": { + "type": "string", + "description": "Short marketing description (1-2 sentences)", + "maxLength": 500 + }, + "features": { + "type": "array", + "description": "List of marketing features to highlight", + "items": { + "type": "string" + } + } + }, + "additionalProperties": true + }, + "createdAt": { + "description": "The time (ISO-8601) at which the plan was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The time (ISO-8601) at which the plan was last updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name", + "pricing" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.subscription-plan:read" + ] + }, + { + "operationId": "updatePlan", + "method": "PATCH", + "path": "/plans/{planId}", + "summary": "Update Subscription Plan", + "description": "Update Subscription Plan", + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "required": false, + "description": "Request ID", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "planId", + "in": "path", + "required": true, + "description": "The plan ID", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": false, + "contentType": "application/json", + "schema": { + "items": { + "$id": "https://godaddy.com/schemas/common/patch-request.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "title": "Patch Request", + "description": "An array of JSON patch objects to apply partial updates to resources.", + "items": { + "$id": "https://godaddy.com/schemas/common/patch.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Patch", + "description": "The JSON patch object to apply partial updates to resources.", + "properties": { + "op": { + "type": "string", + "description": "The operation to complete.", + "enum": [ + "add", + "remove", + "replace", + "move", + "copy", + "test" + ] + }, + "path": { + "type": "string", + "description": "The JSON pointer to the target document location at which to complete the operation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ], + "nullable": true, + "description": "The value to apply. The `remove` operation does not require a value." + }, + "from": { + "type": "string", + "description": "The JSON pointer to the target document location from which to move the value. Required for the `move` operation." + } + }, + "required": [ + "op" + ] + } + }, + "type": "array" + } + }, + "responses": { + "200": { + "description": "Plan updated", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/subscription-plan.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Subscription Plan", + "description": "Resource representing a Subscription Plan that can be purchased by a customer. Supports free plans, fixed recurring pricing, and trial periods.\n", + "type": "object", + "properties": { + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The reference key of the subscription plan. For GODADDY_APP plans, unique per applicationId.\n", + "maxLength": 100 + }, + "displayName": { + "type": "string", + "description": "The display name of the subscription plan shown to customers", + "maxLength": 200 + }, + "description": { + "type": "string", + "description": "Detailed description of what the subscription plan provides", + "maxLength": 1000 + }, + "status": { + "type": "string", + "description": "The status of the subscription plan. E.g. ACTIVE, DRAFT, DEPRECATED, DISCONTINUED", + "default": "ACTIVE", + "x-server-pattern": "^(ACTIVE|DRAFT|DEPRECATED|DISCONTINUED)$" + }, + "applicationId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "billingReferenceId": { + "type": "string", + "description": "The identifier for this plan in the external billing system used for checkout and payment processing. Today this is a Poynt Billing plan ID.\n", + "maxLength": 100 + }, + "billingProvider": { + "type": "string", + "description": "Identifies which external billing system the billingReferenceId belongs to. Acceptable values: POYNT_BILLING, GODADDY_ECOMM.\n", + "x-server-pattern": "^(POYNT_BILLING|GODADDY_ECOMM)$" + }, + "pricing": { + "description": "The pricing configuration for this plan. Uses pricingModel as a discriminator to determine the applicable pricing schema.\n", + "$id": "https://godaddy.com/schemas/commerce/subscriptions/pricing-model.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Pricing Model", + "discriminator": { + "propertyName": "pricingModel", + "mapping": { + "FREE": "./FreePricing.yaml", + "FIXED_RECURRING": "./FixedRecurringPricing.yaml" + } + }, + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/free-pricing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Free Pricing", + "description": "Pricing configuration for a free plan. No charge, entitlement only. No billing cycle, price, or trial fields are applicable.\n", + "type": "object", + "properties": { + "pricingModel": { + "type": "string", + "const": "FREE" + } + }, + "required": [ + "pricingModel" + ], + "additionalProperties": false + }, + { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/fixed-recurring-pricing.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fixed Recurring Pricing", + "description": "Pricing configuration for a fixed recurring plan. A fixed amount is charged on a recurring billing cycle.\n", + "type": "object", + "properties": { + "pricingModel": { + "type": "string", + "const": "FIXED_RECURRING" + }, + "billingCycle": { + "type": "string", + "description": "The recurring interval at which the plan is billed.", + "x-server-pattern": "^(WEEKLY|MONTHLY|YEARLY)$" + }, + "price": { + "description": "The price for this plan. Value must be > 0.", + "$id": "https://godaddy.com/schemas/common/simple-money.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Simple Money", + "properties": { + "currencyCode": { + "$id": "https://godaddy.com/schemas/common/currency-code.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "title": "Currency Code", + "description": "A three-character ISO-4217 currency code.", + "minLength": 3, + "maxLength": 3 + }, + "value": { + "type": "integer", + "format": "int64", + "description": "The value, which might represent intergrals for currencies like `JPY` that are not typically fractional; or, with an implied decimal fraction for currencies like `TND` that are subdivided into thousandths. For the implied number of decimal places for a currency code, see [ISO-4217 Currency Codes](https://en.wikipedia.org/wiki/ISO_4217)." + } + }, + "required": [ + "currencyCode", + "value" + ] + }, + "trialDays": { + "type": "integer", + "description": "Number of days the customer gets free access before the first charge. Payment info is collected upfront. Re-subscriptions skip the trial.\n", + "minimum": 1, + "maximum": 365 + } + }, + "required": [ + "pricingModel", + "billingCycle", + "price" + ] + } + ] + }, + "countryCode": { + "description": "ISO 3166-1 alpha-2 country code where this plan is available. Optional — if omitted, the plan is available in all countries. For country-specific pricing, create separate plans per country.\n", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "marketingData": { + "type": "object", + "description": "Marketing information for the subscription plan", + "properties": { + "headline": { + "type": "string", + "description": "Main marketing headline for the plan", + "maxLength": 200 + }, + "shortDescription": { + "type": "string", + "description": "Short marketing description (1-2 sentences)", + "maxLength": 500 + }, + "features": { + "type": "array", + "description": "List of marketing features to highlight", + "items": { + "type": "string" + } + } + }, + "additionalProperties": true + }, + "createdAt": { + "description": "The time (ISO-8601) at which the plan was created.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The time (ISO-8601) at which the plan was last updated.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "name", + "pricing" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.subscription-plan:update" + ] + }, + { + "operationId": "createSubscription", + "method": "POST", + "path": "/subscriptions", + "summary": "Create Subscription", + "description": "Create Subscription", + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "required": false, + "description": "Request ID", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": false, + "contentType": "application/json", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/subscription.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Subscription", + "description": "Resource representing a Subscription that can be applied at Business or Store level", + "type": "object", + "properties": { + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "customerId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "businessId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "entitlementId": { + "type": "string", + "description": "The identifier of the entitlement, if attached to one" + }, + "applicationId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "subscriptionPlanRef": { + "type": "string", + "description": "The reference key of the plan or product subscribed to" + }, + "planId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "status": { + "type": "string", + "description": "The status of the subscription. E.g. ACTIVE, PENDING, SUSPENDED, CANCELLED. Default is ACTIVE.", + "default": "ACTIVE", + "x-server-pattern": "^(PENDING|ACTIVE|SUSPENDED|CANCELLED)$" + }, + "type": { + "type": "string", + "description": "The type of the subscription. E.g. GODADDY_ECOMM, POYNT_BUNDLE, CUSTOM, GODADDY_APP", + "x-server-pattern": "^(GODADDY_ECOMM|POYNT_BUNDLE|CUSTOM|GODADDY_APP)$" + }, + "expiresAt": { + "description": "The time (in ISO-8601 format) at which the subscription expires. E.g. 2014-09-11T23:14:44Z.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The time (in ISO-8601 format) at which the subscription was created. E.g. 2014-09-11T23:14:44Z.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The time (in ISO-8601 format) at which the subscription was updated. E.g. 2014-09-11T23:14:44Z.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "subscriptionPlanRef" + ] + } + }, + "responses": { + "201": { + "description": "Subscription Created", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/subscription.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Subscription", + "description": "Resource representing a Subscription that can be applied at Business or Store level", + "type": "object", + "properties": { + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "customerId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "businessId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "entitlementId": { + "type": "string", + "description": "The identifier of the entitlement, if attached to one" + }, + "applicationId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "subscriptionPlanRef": { + "type": "string", + "description": "The reference key of the plan or product subscribed to" + }, + "planId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "status": { + "type": "string", + "description": "The status of the subscription. E.g. ACTIVE, PENDING, SUSPENDED, CANCELLED. Default is ACTIVE.", + "default": "ACTIVE", + "x-server-pattern": "^(PENDING|ACTIVE|SUSPENDED|CANCELLED)$" + }, + "type": { + "type": "string", + "description": "The type of the subscription. E.g. GODADDY_ECOMM, POYNT_BUNDLE, CUSTOM, GODADDY_APP", + "x-server-pattern": "^(GODADDY_ECOMM|POYNT_BUNDLE|CUSTOM|GODADDY_APP)$" + }, + "expiresAt": { + "description": "The time (in ISO-8601 format) at which the subscription expires. E.g. 2014-09-11T23:14:44Z.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The time (in ISO-8601 format) at which the subscription was created. E.g. 2014-09-11T23:14:44Z.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The time (in ISO-8601 format) at which the subscription was updated. E.g. 2014-09-11T23:14:44Z.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "subscriptionPlanRef" + ] + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.subscription:create", + "commerce.store:update", + "commerce.business:update" + ] + }, + { + "operationId": "getSubscriptions", + "method": "GET", + "path": "/subscriptions", + "summary": "Get Subscriptions", + "description": "Retrieve the subscriptions by params", + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "required": false, + "description": "Request ID", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "customerId", + "in": "query", + "required": false, + "description": "Customer ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "businessId", + "in": "query", + "required": false, + "description": "Business ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "applicationId", + "in": "query", + "required": false, + "description": "Godaddy Platform Application ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "storeId", + "in": "query", + "required": false, + "description": "Store ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "planId", + "in": "query", + "required": false, + "description": "Filter subscriptions by plan ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "status", + "in": "query", + "required": false, + "description": "Status of the subscription", + "schema": { + "type": "string", + "description": "The status of the subscription. E.g. ACTIVE, PENDING, SUSPENDED, CANCELLED. Default is ACTIVE.", + "default": "ACTIVE", + "pattern": "^(PENDING|ACTIVE|SUSPENDED|CANCELLED)$" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "Type of the subscription. Possible values are GODADDY_ECOMM, POYNT_BUNDLE, CUSTOM, GODADDY_APP.", + "schema": { + "type": "string", + "description": "The type of the subscription. E.g. GODADDY_ECOMM, POYNT_BUNDLE, CUSTOM, GODADDY_APP. Default: GODADDY_ECOMM,POYNT_BUNDLE,CUSTOM", + "default": "GODADDY_ECOMM,POYNT_BUNDLE,CUSTOM" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "totalRequired", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Subscriptions Found", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/subscription-list.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Subscription List", + "type": "object", + "description": "Resource representing a list of subscriptions", + "properties": { + "items": { + "description": "Array containing the current page of subscriptions", + "items": { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/subscription.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Subscription", + "description": "Resource representing a Subscription that can be applied at Business or Store level", + "type": "object", + "properties": { + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "customerId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "businessId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "entitlementId": { + "type": "string", + "description": "The identifier of the entitlement, if attached to one" + }, + "applicationId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "subscriptionPlanRef": { + "type": "string", + "description": "The reference key of the plan or product subscribed to" + }, + "planId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "status": { + "type": "string", + "description": "The status of the subscription. E.g. ACTIVE, PENDING, SUSPENDED, CANCELLED. Default is ACTIVE.", + "default": "ACTIVE", + "x-server-pattern": "^(PENDING|ACTIVE|SUSPENDED|CANCELLED)$" + }, + "type": { + "type": "string", + "description": "The type of the subscription. E.g. GODADDY_ECOMM, POYNT_BUNDLE, CUSTOM, GODADDY_APP", + "x-server-pattern": "^(GODADDY_ECOMM|POYNT_BUNDLE|CUSTOM|GODADDY_APP)$" + }, + "expiresAt": { + "description": "The time (in ISO-8601 format) at which the subscription expires. E.g. 2014-09-11T23:14:44Z.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The time (in ISO-8601 format) at which the subscription was created. E.g. 2014-09-11T23:14:44Z.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The time (in ISO-8601 format) at which the subscription was updated. E.g. 2014-09-11T23:14:44Z.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "subscriptionPlanRef" + ] + }, + "type": "array" + }, + "totalItems": { + "description": "Total number of Subscriptions matching the search criteria. Returned only when totalRequired is set to true.", + "type": "integer" + }, + "totalPages": { + "description": "Total number of pages matching the search criteria. Returned only when totalRequired is set to true.", + "type": "integer" + }, + "links": { + "description": "Array of HATEOAS link relations that should be used to navigate across pages of Subscriptions", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + } + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.subscription:read", + "commerce.store:read", + "commerce.business:read" + ] + }, + { + "operationId": "getSubscriptionById", + "method": "GET", + "path": "/subscriptions/{subscriptionId}", + "summary": "Get Subscription", + "description": "Retrieve the information of the Subscription by ID.", + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "required": false, + "description": "Request ID", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "storeId", + "in": "query", + "required": false, + "description": "Store ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "subscriptionId", + "in": "path", + "required": true, + "description": "The subscription ID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Subscription Found", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/subscription.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Subscription", + "description": "Resource representing a Subscription that can be applied at Business or Store level", + "type": "object", + "properties": { + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "customerId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "businessId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "entitlementId": { + "type": "string", + "description": "The identifier of the entitlement, if attached to one" + }, + "applicationId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "subscriptionPlanRef": { + "type": "string", + "description": "The reference key of the plan or product subscribed to" + }, + "planId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "status": { + "type": "string", + "description": "The status of the subscription. E.g. ACTIVE, PENDING, SUSPENDED, CANCELLED. Default is ACTIVE.", + "default": "ACTIVE", + "x-server-pattern": "^(PENDING|ACTIVE|SUSPENDED|CANCELLED)$" + }, + "type": { + "type": "string", + "description": "The type of the subscription. E.g. GODADDY_ECOMM, POYNT_BUNDLE, CUSTOM, GODADDY_APP", + "x-server-pattern": "^(GODADDY_ECOMM|POYNT_BUNDLE|CUSTOM|GODADDY_APP)$" + }, + "expiresAt": { + "description": "The time (in ISO-8601 format) at which the subscription expires. E.g. 2014-09-11T23:14:44Z.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The time (in ISO-8601 format) at which the subscription was created. E.g. 2014-09-11T23:14:44Z.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The time (in ISO-8601 format) at which the subscription was updated. E.g. 2014-09-11T23:14:44Z.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "subscriptionPlanRef" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.subscription:read", + "commerce.business:read", + "commerce.store:read" + ] + }, + { + "operationId": "updateSubscription", + "method": "PATCH", + "path": "/subscriptions/{subscriptionId}", + "summary": "Update Subscription", + "description": "Update Subscription", + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "required": false, + "description": "Request ID", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "storeId", + "in": "query", + "required": false, + "description": "Store ID", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "subscriptionId", + "in": "path", + "required": true, + "description": "The subscription ID", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": false, + "contentType": "application/json", + "schema": { + "items": { + "$id": "https://godaddy.com/schemas/common/patch-request.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "title": "Patch Request", + "description": "An array of JSON patch objects to apply partial updates to resources.", + "items": { + "$id": "https://godaddy.com/schemas/common/patch.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Patch", + "description": "The JSON patch object to apply partial updates to resources.", + "properties": { + "op": { + "type": "string", + "description": "The operation to complete.", + "enum": [ + "add", + "remove", + "replace", + "move", + "copy", + "test" + ] + }, + "path": { + "type": "string", + "description": "The JSON pointer to the target document location at which to complete the operation." + }, + "value": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": {} + }, + { + "type": "object" + } + ], + "nullable": true, + "description": "The value to apply. The `remove` operation does not require a value." + }, + "from": { + "type": "string", + "description": "The JSON pointer to the target document location from which to move the value. Required for the `move` operation." + } + }, + "required": [ + "op" + ] + } + }, + "type": "array" + } + }, + "responses": { + "200": { + "description": "Subscription updated", + "schema": { + "$id": "https://godaddy.com/schemas/commerce/subscriptions/subscription.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Subscription", + "description": "Resource representing a Subscription that can be applied at Business or Store level", + "type": "object", + "properties": { + "id": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid", + "readOnly": true + }, + "customerId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "businessId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "storeId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "entitlementId": { + "type": "string", + "description": "The identifier of the entitlement, if attached to one" + }, + "applicationId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "subscriptionPlanRef": { + "type": "string", + "description": "The reference key of the plan or product subscribed to" + }, + "planId": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + }, + "status": { + "type": "string", + "description": "The status of the subscription. E.g. ACTIVE, PENDING, SUSPENDED, CANCELLED. Default is ACTIVE.", + "default": "ACTIVE", + "x-server-pattern": "^(PENDING|ACTIVE|SUSPENDED|CANCELLED)$" + }, + "type": { + "type": "string", + "description": "The type of the subscription. E.g. GODADDY_ECOMM, POYNT_BUNDLE, CUSTOM, GODADDY_APP", + "x-server-pattern": "^(GODADDY_ECOMM|POYNT_BUNDLE|CUSTOM|GODADDY_APP)$" + }, + "expiresAt": { + "description": "The time (in ISO-8601 format) at which the subscription expires. E.g. 2014-09-11T23:14:44Z.", + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "createdAt": { + "description": "The time (in ISO-8601 format) at which the subscription was created. E.g. 2014-09-11T23:14:44Z.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + }, + "updatedAt": { + "description": "The time (in ISO-8601 format) at which the subscription was updated. E.g. 2014-09-11T23:14:44Z.", + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" + } + }, + "required": [ + "subscriptionPlanRef" + ] + } + }, + "404": { + "description": "Resource not found", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + }, + "default": { + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schemas/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "definitions": { + "error-details": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + }, + "link-description": { + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + }, + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schemas/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schemas/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target." + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data." + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } + } + }, + "scopes": [ + "commerce.subscription:update", + "commerce.store:update", + "commerce.business:update" + ] + } + ] +} \ No newline at end of file diff --git a/src/cli/schemas/api/taxes.json b/src/cli/schemas/api/taxes.json new file mode 100644 index 0000000..796a747 --- /dev/null +++ b/src/cli/schemas/api/taxes.json @@ -0,0 +1,1039 @@ +{ + "name": "taxes", + "title": "Tax GraphQL API", + "description": "", + "version": "2.0.0", + "baseUrl": "https://api.godaddy.com/v2/commerce", + "endpoints": [ + { + "operationId": "postTaxGraphql", + "method": "POST", + "path": "/stores/{storeId}/tax-subgraph", + "summary": "Tax GraphQL endpoint", + "parameters": [ + { + "name": "storeId", + "in": "path", + "required": true, + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + }, + { + "name": "x-store-id", + "in": "header", + "required": true, + "description": "Store ID header required by tax subgraph", + "schema": { + "$id": "https://godaddy.com/schemas/common/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A universally unique identifier (UUID) in [RFC-4122 format](https://tools.ietf.org/html/rfc4122).", + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "contentType": "application/json", + "schema": { + "type": "object", + "required": [ + "query" + ], + "properties": { + "query": { + "type": "string" + }, + "variables": { + "type": "object", + "additionalProperties": true + }, + "operationName": { + "type": "string" + } + } + } + }, + "responses": { + "200": { + "description": "GraphQL response", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "nullable": true, + "additionalProperties": true + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, + "400": { + "description": "Invalid request" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Store not found" + }, + "500": { + "description": "Internal server error" + } + }, + "scopes": [ + "commerce.tax:read", + "commerce.tax:create", + "commerce.tax:write", + "commerce.tax:delete" + ], + "graphql": { + "schemaRef": "./graphql/schema.graphql", + "operationCount": 47, + "operations": [ + { + "name": "classification", + "kind": "query", + "returnType": "Classification", + "description": "Get a single classification.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true, + "description": "The classification ID." + } + ] + }, + { + "name": "classifications", + "kind": "query", + "returnType": "QueryClassificationsConnection", + "description": "Get a collection of classifications.", + "deprecated": false, + "args": [ + { + "name": "after", + "type": "String", + "required": false + }, + { + "name": "before", + "type": "String", + "required": false + }, + { + "name": "first", + "type": "Int", + "required": false + }, + { + "name": "id", + "type": "ClassificationIdFilter", + "required": false + }, + { + "name": "last", + "type": "Int", + "required": false + }, + { + "name": "orderBy", + "type": "ClassificationOrderBy", + "required": false + } + ] + }, + { + "name": "jurisdiction", + "kind": "query", + "returnType": "Jurisdiction", + "description": "Get a single jurisdiction.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true, + "description": "The jurisdiction ID." + } + ] + }, + { + "name": "jurisdictions", + "kind": "query", + "returnType": "QueryJurisdictionsConnection", + "description": "Get a collection of jurisdictions.", + "deprecated": false, + "args": [ + { + "name": "after", + "type": "String", + "required": false + }, + { + "name": "before", + "type": "String", + "required": false + }, + { + "name": "first", + "type": "Int", + "required": false + }, + { + "name": "id", + "type": "JurisdictionIdFilter", + "required": false + }, + { + "name": "last", + "type": "Int", + "required": false + }, + { + "name": "orderBy", + "type": "JurisdictionOrderBy", + "required": false + } + ] + }, + { + "name": "override", + "kind": "query", + "returnType": "Override", + "description": "Get a single override.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true, + "description": "The override ID." + } + ] + }, + { + "name": "overrides", + "kind": "query", + "returnType": "QueryOverridesConnection", + "description": "Get a collection of overrides.", + "deprecated": false, + "args": [ + { + "name": "after", + "type": "String", + "required": false + }, + { + "name": "before", + "type": "String", + "required": false + }, + { + "name": "first", + "type": "Int", + "required": false + }, + { + "name": "id", + "type": "OverrideIdFilter", + "required": false + }, + { + "name": "last", + "type": "Int", + "required": false + }, + { + "name": "orderBy", + "type": "OverrideOrderBy", + "required": false + }, + { + "name": "referenceValue", + "type": "ReferenceValueFilter", + "required": false + } + ] + }, + { + "name": "rate", + "kind": "query", + "returnType": "Rate", + "description": "Get a single rate.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true, + "description": "The rate ID." + } + ] + }, + { + "name": "rates", + "kind": "query", + "returnType": "QueryRatesConnection", + "description": "Get a collection of rates.", + "deprecated": false, + "args": [ + { + "name": "after", + "type": "String", + "required": false + }, + { + "name": "before", + "type": "String", + "required": false + }, + { + "name": "first", + "type": "Int", + "required": false + }, + { + "name": "id", + "type": "RateIdFilter", + "required": false + }, + { + "name": "last", + "type": "Int", + "required": false + }, + { + "name": "orderBy", + "type": "RateOrderBy", + "required": false + }, + { + "name": "referenceValue", + "type": "ReferenceValueFilter", + "required": false + }, + { + "name": "status", + "type": "RateStatusFilter", + "required": false + } + ] + }, + { + "name": "activateOverride", + "kind": "mutation", + "returnType": "Override", + "description": "Activate an existing override.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true + } + ] + }, + { + "name": "activateRate", + "kind": "mutation", + "returnType": "Rate", + "description": "Activate an existing rate.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true + } + ] + }, + { + "name": "addListsToClassification", + "kind": "mutation", + "returnType": "Classification", + "description": "Add existing lists to an existing classification.", + "deprecated": false, + "args": [ + { + "name": "classificationId", + "type": "ID!", + "required": true, + "description": "The ID of the classification to which the lists should be added." + }, + { + "name": "input", + "type": "MutationAddListsToClassificationInput!", + "required": true + } + ] + }, + { + "name": "addListsToOverride", + "kind": "mutation", + "returnType": "Override", + "description": "Add existing lists to an existing override.", + "deprecated": false, + "args": [ + { + "name": "input", + "type": "MutationAddListsToOverrideInput!", + "required": true + }, + { + "name": "overrideId", + "type": "ID!", + "required": true + } + ] + }, + { + "name": "addRatesToClassification", + "kind": "mutation", + "returnType": "Classification", + "description": "Add existing rates to an existing classification.", + "deprecated": false, + "args": [ + { + "name": "classificationId", + "type": "ID!", + "required": true, + "description": "The ID of the classification to which the rates should be added." + }, + { + "name": "input", + "type": "MutationAddRatesToClassificationInput!", + "required": true + } + ] + }, + { + "name": "addRatesToOverride", + "kind": "mutation", + "returnType": "Override", + "description": "Add existing rates to an existing override.", + "deprecated": false, + "args": [ + { + "name": "input", + "type": "MutationAddRatesToOverrideInput!", + "required": true + }, + { + "name": "overrideId", + "type": "ID!", + "required": true + } + ] + }, + { + "name": "addSkuGroupsToOverride", + "kind": "mutation", + "returnType": "Override", + "description": "Add existing SKU groups to an existing override.", + "deprecated": false, + "args": [ + { + "name": "input", + "type": "MutationAddSkuGroupsToOverrideInput!", + "required": true + }, + { + "name": "overrideId", + "type": "ID!", + "required": true + } + ] + }, + { + "name": "addSkusGroupsToClassification", + "kind": "mutation", + "returnType": "Classification", + "description": "Add existing SKU groups to an existing classification.", + "deprecated": false, + "args": [ + { + "name": "classificationId", + "type": "ID!", + "required": true, + "description": "The ID of the classification to which the SKU groups should be added." + }, + { + "name": "input", + "type": "MutationAddSkusGroupsToClassificationInput!", + "required": true + } + ] + }, + { + "name": "addSkusToClassification", + "kind": "mutation", + "returnType": "Classification", + "description": "Add existing SKUs to an existing classification.", + "deprecated": false, + "args": [ + { + "name": "classificationId", + "type": "ID!", + "required": true, + "description": "The ID of the classification to which the SKUs should be added." + }, + { + "name": "input", + "type": "MutationAddSkusToClassificationInput!", + "required": true + } + ] + }, + { + "name": "addSkusToOverride", + "kind": "mutation", + "returnType": "Override", + "description": "Add existing SKUs to an existing override.", + "deprecated": false, + "args": [ + { + "name": "input", + "type": "MutationAddSkusToOverrideInput!", + "required": true + }, + { + "name": "overrideId", + "type": "ID!", + "required": true + } + ] + }, + { + "name": "calculateTaxes", + "kind": "mutation", + "returnType": "CalculationResult", + "description": "Calculate taxes.", + "deprecated": false, + "args": [ + { + "name": "channelId", + "type": "ID!", + "required": true + }, + { + "name": "input", + "type": "MutationCalculateTaxesInput!", + "required": true + } + ] + }, + { + "name": "createClassification", + "kind": "mutation", + "returnType": "Classification", + "description": "Create a new classification.", + "deprecated": false, + "args": [ + { + "name": "input", + "type": "MutationCreateClassificationInput!", + "required": true + } + ] + }, + { + "name": "createJurisdiction", + "kind": "mutation", + "returnType": "Jurisdiction", + "description": "Create a new jurisdiction.", + "deprecated": false, + "args": [ + { + "name": "input", + "type": "MutationCreateJurisdictionInput!", + "required": true + } + ] + }, + { + "name": "createOverride", + "kind": "mutation", + "returnType": "Override", + "description": "Create a new override.", + "deprecated": false, + "args": [ + { + "name": "input", + "type": "MutationCreateOverrideInput!", + "required": true + } + ] + }, + { + "name": "createRate", + "kind": "mutation", + "returnType": "Rate", + "description": "Create a new rate.", + "deprecated": false, + "args": [ + { + "name": "input", + "type": "MutationCreateRateInput!", + "required": true + } + ] + }, + { + "name": "createReferencesForClassification", + "kind": "mutation", + "returnType": "Classification", + "description": "Create references for an existing classifiction.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true, + "description": "The ID of the classification for which the references should be created." + }, + { + "name": "input", + "type": "MutationCreateReferencesForClassificationInput!", + "required": true + } + ] + }, + { + "name": "createReferencesForOverride", + "kind": "mutation", + "returnType": "Override", + "description": "Create references for an existing override.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true + }, + { + "name": "input", + "type": "MutationCreateReferencesForOverrideInput!", + "required": true + } + ] + }, + { + "name": "createReferencesForRate", + "kind": "mutation", + "returnType": "Rate", + "description": "Create references for an existing rate.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true + }, + { + "name": "input", + "type": "MutationCreateReferencesForRateInput!", + "required": true + } + ] + }, + { + "name": "deactivateOverride", + "kind": "mutation", + "returnType": "Override", + "description": "Deactivate an existing override.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true + } + ] + }, + { + "name": "deactivateRate", + "kind": "mutation", + "returnType": "Rate", + "description": "Deactivate an existing rate.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true + } + ] + }, + { + "name": "deleteClassification", + "kind": "mutation", + "returnType": "Classification", + "description": "Delete an existing classification.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true, + "description": "The ID of the classification to be deleted." + } + ] + }, + { + "name": "deleteJurisdiction", + "kind": "mutation", + "returnType": "Jurisdiction", + "description": "Delete an existing jurisdiction.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true, + "description": "The ID of the jurisdiction to be deleted." + } + ] + }, + { + "name": "deleteOverride", + "kind": "mutation", + "returnType": "Override", + "description": "Delete an existing override.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true + } + ] + }, + { + "name": "deleteRate", + "kind": "mutation", + "returnType": "Rate", + "description": "Delete an existing rate.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true + } + ] + }, + { + "name": "deleteReferencesFromClassification", + "kind": "mutation", + "returnType": "Classification", + "description": "Delete references from an existing classification.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true, + "description": "The ID of the classification for which the references should be deleted." + }, + { + "name": "input", + "type": "MutationDeleteReferencesFromClassificationInput!", + "required": true + } + ] + }, + { + "name": "deleteReferencesFromOverride", + "kind": "mutation", + "returnType": "Override", + "description": "Delete references from an existing override.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true + }, + { + "name": "input", + "type": "MutationDeleteReferencesFromOverrideInput!", + "required": true + } + ] + }, + { + "name": "deleteReferencesFromRate", + "kind": "mutation", + "returnType": "Rate", + "description": "Delete references from an existing rate.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true + }, + { + "name": "input", + "type": "MutationDeleteReferencesFromRateInput!", + "required": true + } + ] + }, + { + "name": "removeListsFromClassification", + "kind": "mutation", + "returnType": "Classification", + "description": "Remove existing lists from an existing classification.", + "deprecated": false, + "args": [ + { + "name": "classificationId", + "type": "ID!", + "required": true, + "description": "The ID of the classification to which the lists should be removed." + }, + { + "name": "input", + "type": "MutationRemoveListsFromClassificationInput!", + "required": true + } + ] + }, + { + "name": "removeListsFromOverride", + "kind": "mutation", + "returnType": "Override", + "description": "Remove existing lists from an existing override.", + "deprecated": false, + "args": [ + { + "name": "input", + "type": "MutationRemoveListsFromOverrideInput!", + "required": true + }, + { + "name": "overrideId", + "type": "ID!", + "required": true + } + ] + }, + { + "name": "removeRatesFromClassification", + "kind": "mutation", + "returnType": "Classification", + "description": "Remove existing rates from an existing classification.", + "deprecated": false, + "args": [ + { + "name": "classificationId", + "type": "ID!", + "required": true, + "description": "The ID of the classification to which the rates should be removed." + }, + { + "name": "input", + "type": "MutationRemoveRatesFromClassificationInput!", + "required": true + } + ] + }, + { + "name": "removeRatesFromOverride", + "kind": "mutation", + "returnType": "Override", + "description": "Remove existing rates from an existing override.", + "deprecated": false, + "args": [ + { + "name": "input", + "type": "MutationRemoveRatesFromOverrideInput!", + "required": true + }, + { + "name": "overrideId", + "type": "ID!", + "required": true + } + ] + }, + { + "name": "removeSkusFromClassification", + "kind": "mutation", + "returnType": "Classification", + "description": "Remove existing SKUs from an existing classification.", + "deprecated": false, + "args": [ + { + "name": "classificationId", + "type": "ID!", + "required": true, + "description": "The ID of the classification to which the SKUs should be removed." + }, + { + "name": "input", + "type": "MutationRemoveSkusFromClassificationInput!", + "required": true + } + ] + }, + { + "name": "removeSkusFromOverride", + "kind": "mutation", + "returnType": "Override", + "description": "Remove existing SKUs from an existing override.", + "deprecated": false, + "args": [ + { + "name": "input", + "type": "MutationRemoveSkusFromOverrideInput!", + "required": true + }, + { + "name": "overrideId", + "type": "ID!", + "required": true + } + ] + }, + { + "name": "removeSkusGroupsFromClassification", + "kind": "mutation", + "returnType": "Classification", + "description": "Remove existing SKU groups from an existing classification.", + "deprecated": false, + "args": [ + { + "name": "classificationId", + "type": "ID!", + "required": true, + "description": "The ID of the classification to which the SKU groups should be added." + }, + { + "name": "input", + "type": "MutationRemoveSkusGroupsFromClassificationInput!", + "required": true + } + ] + }, + { + "name": "removeSkusGroupsFromOverride", + "kind": "mutation", + "returnType": "Override", + "description": "Remove existing SKU groups from an existing override.", + "deprecated": false, + "args": [ + { + "name": "input", + "type": "MutationRemoveSkusGroupsFromOverrideInput!", + "required": true + }, + { + "name": "overrideId", + "type": "ID!", + "required": true + } + ] + }, + { + "name": "updateClassification", + "kind": "mutation", + "returnType": "Classification", + "description": "Update an existing classification.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true, + "description": "The ID of the classification to be updated." + }, + { + "name": "input", + "type": "MutationUpdateClassificationInput!", + "required": true + } + ] + }, + { + "name": "updateJurisdiction", + "kind": "mutation", + "returnType": "Jurisdiction", + "description": "Update an existing jurisdiction.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true, + "description": "The ID of the jurisdiction to be updated." + }, + { + "name": "input", + "type": "MutationUpdateJurisdictionInput!", + "required": true + } + ] + }, + { + "name": "updateOverride", + "kind": "mutation", + "returnType": "Override", + "description": "Update an existing override.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true + }, + { + "name": "input", + "type": "MutationUpdateOverrideInput!", + "required": true + } + ] + }, + { + "name": "updateRate", + "kind": "mutation", + "returnType": "Rate", + "description": "Update an existing rate.", + "deprecated": false, + "args": [ + { + "name": "id", + "type": "ID!", + "required": true + }, + { + "name": "input", + "type": "MutationUpdateRateInput!", + "required": true + } + ] + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/cli/schemas/api/transactions.json b/src/cli/schemas/api/transactions.json index bf073a6..ffae249 100644 --- a/src/cli/schemas/api/transactions.json +++ b/src/cli/schemas/api/transactions.json @@ -17,7 +17,14 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Uuid.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true } }, { @@ -64,7 +71,16 @@ "schema": { "type": "array", "items": { - "$ref": "./types/Id.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom ID format that can take URN or an UUID", + "type": "string", + "example": "urn:trn:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", + "x-custom-type": true, + "x-custom-id": true } } }, @@ -74,7 +90,13 @@ "required": false, "description": "Transaction filter updatedAt start date", "schema": { - "$ref": "./common-types/date-time.json" + "$id": "https://godaddy.com/schema/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" } }, { @@ -83,7 +105,13 @@ "required": false, "description": "Transaction filter updatedAt end date", "schema": { - "$ref": "./common-types/date-time.json" + "$id": "https://godaddy.com/schema/common/date-time.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "A date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Note: The regular expression provides static schematic guidance but does not reject all invalid dates.", + "type": "string", + "minLength": 20, + "maxLength": 64, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$" } }, { @@ -93,7 +121,9 @@ "description": "Transaction sort field", "schema": { "type": "string", - "enum": ["updatedAt"], + "enum": [ + "updatedAt" + ], "default": "updatedAt" } }, @@ -104,7 +134,10 @@ "description": "Transaction sort order", "schema": { "type": "string", - "enum": ["ASC", "DESC"], + "enum": [ + "ASC", + "DESC" + ], "default": "ASC" } } @@ -116,13 +149,15190 @@ "title": "Transactions", "allOf": [ { - "$ref": "#/components/schemas/pagedList" + "properties": { + "totalItems": { + "type": "integer" + }, + "totalPages": { + "type": "integer" + }, + "links": { + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "description": "HATEOAS links", + "type": "array", + "x-auto-generated": true, + "definitions": { + "Link": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + }, + "items": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + } } ], "properties": { "items": { "items": { - "$ref": "./models/transaction/Transaction.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Transaction details", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/authorization.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Authorization Transaction", + "type": "object", + "x-generic-type": "Transaction", + "description": "Represents authorization transaction against a payment", + "properties": { + "captureBy": { + "type": "string", + "description": "Time by which the Authorization transaction should be captured (RFC 3339 format).", + "format": "date-time", + "readOnly": true, + "example": "2022-07-21T17:32:28Z" + }, + "updatedAt": { + "deprecated": true, + "type": "string", + "format": "date-time", + "description": "Updated time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/capture.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Capture Transaction", + "type": "object", + "x-generic-type": "Transaction", + "description": "Represents capture transaction against a payment", + "properties": { + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/transaction/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom ID format that can take URN or an UUID", + "type": "string", + "example": "urn:trn:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", + "x-custom-type": true, + "x-custom-id": true + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/refund.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Refund Transaction", + "type": "object", + "x-generic-type": "Transaction", + "description": "Represents refund transaction against a payment", + "properties": { + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/transaction/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom ID format that can take URN or an UUID", + "type": "string", + "example": "urn:trn:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", + "x-custom-type": true, + "x-custom-id": true + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/adjustment.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Adjustment Transaction", + "type": "object", + "x-generic-type": "Transaction", + "description": "Represents Adjustment transaction against a payment", + "properties": { + "newAmount": { + "description": "Adjusted transaction amount", + "$id": "https://godaddy.com/schemas/commerce/transaction/amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "description": "Simple amount used for processing transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Transaction amount" + }, + "currency": { + "description": "Transaction currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/detailed-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "description": "Itemized amount details used for processing transaction", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/transaction/tip-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "format": "int64", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "description": "Fee associated with transaction", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Fee", + "type": "object", + "description": "Simple fee associated with transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/governed-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Governed Fee", + "description": "Governed fee associated with transaction", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "programType": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "type": { + "type": "string", + "example": "FIXED", + "description": "How the fee should be appliedbinary", + "enum": [ + "FIXED", + "HYBRID", + "PERCENTAGE" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + } + }, + "required": [ + "amount", + "programType", + "type" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + }, + "required": [ + "amountType" + ] + }, + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/transaction/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom ID format that can take URN or an UUID", + "type": "string", + "example": "urn:trn:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", + "x-custom-type": true, + "x-custom-id": true + } + }, + "required": [ + "newAmount" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/sale.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Sale Transaction", + "type": "object", + "x-generic-type": "Transaction", + "description": "Represents sale transaction against a payment", + "properties": { + "updatedAt": { + "deprecated": true, + "type": "string", + "format": "date-time", + "description": "Updated time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "AUTHORIZE": "./Authorization.yaml", + "CAPTURE": "./Capture.yaml", + "REFUND": "./Refund.yaml", + "ADJUSTMENT": "./Adjustment.yaml", + "SALE": "./Sale.yaml" + } + }, + "x-generic-type": "Transaction", + "properties": { + "type": { + "type": "string", + "description": "Discriminator field representing the type of Transaction" + }, + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/transaction/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom ID format that can take URN or an UUID", + "type": "string", + "example": "urn:trn:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/transaction/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "storeId": { + "$id": "https://godaddy.com/schemas/commerce/transaction/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "fundingSource": { + "description": "Funding source", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Funding Source", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Card", + "type": "object", + "description": "Payment card", + "properties": { + "cardDetail": { + "description": "Card detail", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "numberHashed": { + "type": "string", + "description": "Card number hashed", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER", + "INTERAC", + "BANCOMAT", + "MAESTRO", + "DINERS_CLUB", + "JCB", + "UNIONPAY", + "BANKAXEPT", + "OTHER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "PAZE", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1data": { + "type": "string", + "writeOnly": true, + "description": "In some use-cases (like airlines) Track1 is required. Track1 contains some extra information over Track2 (like cardholder's name)." + }, + "track2data": { + "type": "string", + "writeOnly": true, + "description": "Required for swiped transactions. Track2 read from the card contains PAN, expiration, etc." + }, + "track3data": { + "type": "string", + "writeOnly": true, + "description": "Track3 for future use. Carries track from custom funding sources." + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-entry-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/interacmac.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "currency": { + "description": "Card's native currency code, when available.", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "legacyData": { + "deprecated": true, + "description": "Contains card details represented by legacy system", + "$id": "https://poynt.godaddy.com/schemas/funding-source/card-detail.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "$defs": { + "LegacyCardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "LegacyCardAgreementMetadata": { + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + }, + "description": "Object to represent card agreement metadata. Will hold the agreement template properties, language, country code etc." + }, + "LegacyCardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "LegacyCardKeyData": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + }, + "LegacyCardType": { + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + }, + "LegacyCardKey": { + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + } + }, + "properties": { + "cardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "status": { + "type": "string", + "description": "Status of the card.", + "enum": [ + "ACTIVE", + "REMOVED" + ] + }, + "cardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "cardHolderFullName": { + "type": "string", + "description": "Card holder's full name usually picked from track1.", + "maxLength": 256 + }, + "cardId": { + "type": "string", + "description": "The uuid of the card created" + }, + "encrypted": { + "type": "boolean", + "description": "True if track, PAN, expiration are encrypted." + }, + "encryptedExpirationDate": { + "type": "string", + "description": "If encryption is true, a single encrypted expiration date (containing year, month and possibly date) is provided here." + }, + "expirationDate": { + "type": "integer", + "description": "The date from expiration. Date is typically only present in EMV cards." + }, + "id": { + "type": "integer", + "description": "The id of the card created." + }, + "issuer": { + "type": "string" + }, + "key": { + "description": "List of keys and their versions being used. If encrypted is true, only one of key and keySerialNumber can be populated (not both).", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + } + }, + "numberFirst6": { + "type": "string", + "description": "This is a response field. The first6 numbers of the PAN." + }, + "numberHashed": { + "type": "string" + }, + "numberLast4": { + "type": "string", + "description": "This is a response field. The last4 numbers of the PAN." + }, + "type": { + "description": "The network card belongs to: DISCOVER, VISA, MASTERCARD, AMEX, etc.", + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + } + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "writeOnly": true, + "description": "Verification data that can be used to verify the customer information", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Verification Data", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/card-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Verification Data", + "description": "Verification data for the card used as funding source", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/token-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token Verification Data", + "description": "Verification data for the token used as funding source", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type representing the type of verification data" + } + }, + "required": [ + "type" + ] + }, + "processingInstruction": { + "writeOnly": true, + "description": "Processing instruction to use this funding source", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/card-processing-instruction.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processing Instruction", + "type": "object", + "properties": { + "signatureRequired": { + "type": "boolean", + "default": false, + "description": "If signature is required for this transaction" + }, + "debit": { + "type": "boolean", + "default": false, + "description": "If card should be processed as debit or not" + } + } + } + }, + "required": [ + "cardDetail" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/ebt-card.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "EBT Card", + "type": "object", + "description": "EBT Card", + "properties": { + "cardDetail": { + "description": "Card detail", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "numberHashed": { + "type": "string", + "description": "Card number hashed", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER", + "INTERAC", + "BANCOMAT", + "MAESTRO", + "DINERS_CLUB", + "JCB", + "UNIONPAY", + "BANKAXEPT", + "OTHER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "PAZE", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1data": { + "type": "string", + "writeOnly": true, + "description": "In some use-cases (like airlines) Track1 is required. Track1 contains some extra information over Track2 (like cardholder's name)." + }, + "track2data": { + "type": "string", + "writeOnly": true, + "description": "Required for swiped transactions. Track2 read from the card contains PAN, expiration, etc." + }, + "track3data": { + "type": "string", + "writeOnly": true, + "description": "Track3 for future use. Carries track from custom funding sources." + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-entry-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/interacmac.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "currency": { + "description": "Card's native currency code, when available.", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "legacyData": { + "deprecated": true, + "description": "Contains card details represented by legacy system", + "$id": "https://poynt.godaddy.com/schemas/funding-source/card-detail.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "$defs": { + "LegacyCardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "LegacyCardAgreementMetadata": { + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + }, + "description": "Object to represent card agreement metadata. Will hold the agreement template properties, language, country code etc." + }, + "LegacyCardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "LegacyCardKeyData": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + }, + "LegacyCardType": { + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + }, + "LegacyCardKey": { + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + } + }, + "properties": { + "cardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "status": { + "type": "string", + "description": "Status of the card.", + "enum": [ + "ACTIVE", + "REMOVED" + ] + }, + "cardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "cardHolderFullName": { + "type": "string", + "description": "Card holder's full name usually picked from track1.", + "maxLength": 256 + }, + "cardId": { + "type": "string", + "description": "The uuid of the card created" + }, + "encrypted": { + "type": "boolean", + "description": "True if track, PAN, expiration are encrypted." + }, + "encryptedExpirationDate": { + "type": "string", + "description": "If encryption is true, a single encrypted expiration date (containing year, month and possibly date) is provided here." + }, + "expirationDate": { + "type": "integer", + "description": "The date from expiration. Date is typically only present in EMV cards." + }, + "id": { + "type": "integer", + "description": "The id of the card created." + }, + "issuer": { + "type": "string" + }, + "key": { + "description": "List of keys and their versions being used. If encrypted is true, only one of key and keySerialNumber can be populated (not both).", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + } + }, + "numberFirst6": { + "type": "string", + "description": "This is a response field. The first6 numbers of the PAN." + }, + "numberHashed": { + "type": "string" + }, + "numberLast4": { + "type": "string", + "description": "This is a response field. The last4 numbers of the PAN." + }, + "type": { + "description": "The network card belongs to: DISCOVER, VISA, MASTERCARD, AMEX, etc.", + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + } + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "description": "Card verification data", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Verification Data", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/card-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Verification Data", + "description": "Verification data for the card used as funding source", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/token-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token Verification Data", + "description": "Verification data for the token used as funding source", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type representing the type of verification data" + } + }, + "required": [ + "type" + ] + }, + "cardType": { + "type": "string", + "description": "Type of EBT card used", + "enum": [ + "FOOD_STAMP", + "CASH_BENEFIT", + "ELECTRONIC_VOUCHER" + ] + }, + "eVoucherSerial": { + "type": "string", + "minLength": 1, + "maxLength": 15, + "description": "EVoucher serial if used with Electronic Voucher" + }, + "eVoucherApprovalCode": { + "type": "string", + "minLength": 6, + "maxLength": 6, + "description": "EVoucher Approval code if used with Electronic Voucher" + } + }, + "required": [ + "cardDetail", + "cardType" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/godaddy-payment-token.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GoDaddy Payment Token", + "description": "GoDaddy Card-on-file Funding source", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-token.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Token Funding Source", + "type": "object", + "description": "Payment Token Funding source", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Verification Data", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/card-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Verification Data", + "description": "Verification data for the card used as funding source", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/token-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token Verification Data", + "description": "Verification data for the token used as funding source", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type representing the type of verification data" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Godaddy Payment token", + "writeOnly": true, + "x-sensitivity": { + "classification": "restricted" + }, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + }, + "cardDetail": { + "description": "Card that was used with the Godaddy payment token", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "numberHashed": { + "type": "string", + "description": "Card number hashed", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER", + "INTERAC", + "BANCOMAT", + "MAESTRO", + "DINERS_CLUB", + "JCB", + "UNIONPAY", + "BANKAXEPT", + "OTHER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "PAZE", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1data": { + "type": "string", + "writeOnly": true, + "description": "In some use-cases (like airlines) Track1 is required. Track1 contains some extra information over Track2 (like cardholder's name)." + }, + "track2data": { + "type": "string", + "writeOnly": true, + "description": "Required for swiped transactions. Track2 read from the card contains PAN, expiration, etc." + }, + "track3data": { + "type": "string", + "writeOnly": true, + "description": "Track3 for future use. Carries track from custom funding sources." + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-entry-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/interacmac.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "currency": { + "description": "Card's native currency code, when available.", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "legacyData": { + "deprecated": true, + "description": "Contains card details represented by legacy system", + "$id": "https://poynt.godaddy.com/schemas/funding-source/card-detail.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "$defs": { + "LegacyCardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "LegacyCardAgreementMetadata": { + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + }, + "description": "Object to represent card agreement metadata. Will hold the agreement template properties, language, country code etc." + }, + "LegacyCardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "LegacyCardKeyData": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + }, + "LegacyCardType": { + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + }, + "LegacyCardKey": { + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + } + }, + "properties": { + "cardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "status": { + "type": "string", + "description": "Status of the card.", + "enum": [ + "ACTIVE", + "REMOVED" + ] + }, + "cardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "cardHolderFullName": { + "type": "string", + "description": "Card holder's full name usually picked from track1.", + "maxLength": 256 + }, + "cardId": { + "type": "string", + "description": "The uuid of the card created" + }, + "encrypted": { + "type": "boolean", + "description": "True if track, PAN, expiration are encrypted." + }, + "encryptedExpirationDate": { + "type": "string", + "description": "If encryption is true, a single encrypted expiration date (containing year, month and possibly date) is provided here." + }, + "expirationDate": { + "type": "integer", + "description": "The date from expiration. Date is typically only present in EMV cards." + }, + "id": { + "type": "integer", + "description": "The id of the card created." + }, + "issuer": { + "type": "string" + }, + "key": { + "description": "List of keys and their versions being used. If encrypted is true, only one of key and keySerialNumber can be populated (not both).", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + } + }, + "numberFirst6": { + "type": "string", + "description": "This is a response field. The first6 numbers of the PAN." + }, + "numberHashed": { + "type": "string" + }, + "numberLast4": { + "type": "string", + "description": "This is a response field. The last4 numbers of the PAN." + }, + "type": { + "description": "The network card belongs to: DISCOVER, VISA, MASTERCARD, AMEX, etc.", + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + } + } + } + }, + "required": [ + "type", + "number", + "source" + ] + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/applepay-token.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ApplePay Payment Token", + "type": "object", + "description": "ApplePay Funding source", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-token.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Token Funding Source", + "type": "object", + "description": "Payment Token Funding source", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Verification Data", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/card-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Verification Data", + "description": "Verification data for the card used as funding source", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/token-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token Verification Data", + "description": "Verification data for the token used as funding source", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type representing the type of verification data" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Apple pay token", + "writeOnly": true, + "x-sensitivity": { + "classification": "restricted" + }, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + }, + "cardDetail": { + "description": "Card that was used with the Apple pay token", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "numberHashed": { + "type": "string", + "description": "Card number hashed", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER", + "INTERAC", + "BANCOMAT", + "MAESTRO", + "DINERS_CLUB", + "JCB", + "UNIONPAY", + "BANKAXEPT", + "OTHER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "PAZE", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1data": { + "type": "string", + "writeOnly": true, + "description": "In some use-cases (like airlines) Track1 is required. Track1 contains some extra information over Track2 (like cardholder's name)." + }, + "track2data": { + "type": "string", + "writeOnly": true, + "description": "Required for swiped transactions. Track2 read from the card contains PAN, expiration, etc." + }, + "track3data": { + "type": "string", + "writeOnly": true, + "description": "Track3 for future use. Carries track from custom funding sources." + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-entry-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/interacmac.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "currency": { + "description": "Card's native currency code, when available.", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "legacyData": { + "deprecated": true, + "description": "Contains card details represented by legacy system", + "$id": "https://poynt.godaddy.com/schemas/funding-source/card-detail.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "$defs": { + "LegacyCardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "LegacyCardAgreementMetadata": { + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + }, + "description": "Object to represent card agreement metadata. Will hold the agreement template properties, language, country code etc." + }, + "LegacyCardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "LegacyCardKeyData": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + }, + "LegacyCardType": { + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + }, + "LegacyCardKey": { + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + } + }, + "properties": { + "cardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "status": { + "type": "string", + "description": "Status of the card.", + "enum": [ + "ACTIVE", + "REMOVED" + ] + }, + "cardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "cardHolderFullName": { + "type": "string", + "description": "Card holder's full name usually picked from track1.", + "maxLength": 256 + }, + "cardId": { + "type": "string", + "description": "The uuid of the card created" + }, + "encrypted": { + "type": "boolean", + "description": "True if track, PAN, expiration are encrypted." + }, + "encryptedExpirationDate": { + "type": "string", + "description": "If encryption is true, a single encrypted expiration date (containing year, month and possibly date) is provided here." + }, + "expirationDate": { + "type": "integer", + "description": "The date from expiration. Date is typically only present in EMV cards." + }, + "id": { + "type": "integer", + "description": "The id of the card created." + }, + "issuer": { + "type": "string" + }, + "key": { + "description": "List of keys and their versions being used. If encrypted is true, only one of key and keySerialNumber can be populated (not both).", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + } + }, + "numberFirst6": { + "type": "string", + "description": "This is a response field. The first6 numbers of the PAN." + }, + "numberHashed": { + "type": "string" + }, + "numberLast4": { + "type": "string", + "description": "This is a response field. The last4 numbers of the PAN." + }, + "type": { + "description": "The network card belongs to: DISCOVER, VISA, MASTERCARD, AMEX, etc.", + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + } + } + } + }, + "required": [ + "type", + "number", + "source" + ] + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/google-pay-token.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GooglePay Payment Token", + "description": "GooglePay Funding source", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-token.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Token Funding Source", + "type": "object", + "description": "Payment Token Funding source", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Verification Data", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/card-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Verification Data", + "description": "Verification data for the card used as funding source", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/token-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token Verification Data", + "description": "Verification data for the token used as funding source", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type representing the type of verification data" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Google pay token", + "writeOnly": true, + "x-sensitivity": { + "classification": "restricted" + }, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + }, + "cardDetail": { + "description": "Card that was used with the Google pay token", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "numberHashed": { + "type": "string", + "description": "Card number hashed", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER", + "INTERAC", + "BANCOMAT", + "MAESTRO", + "DINERS_CLUB", + "JCB", + "UNIONPAY", + "BANKAXEPT", + "OTHER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "PAZE", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1data": { + "type": "string", + "writeOnly": true, + "description": "In some use-cases (like airlines) Track1 is required. Track1 contains some extra information over Track2 (like cardholder's name)." + }, + "track2data": { + "type": "string", + "writeOnly": true, + "description": "Required for swiped transactions. Track2 read from the card contains PAN, expiration, etc." + }, + "track3data": { + "type": "string", + "writeOnly": true, + "description": "Track3 for future use. Carries track from custom funding sources." + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-entry-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/interacmac.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "currency": { + "description": "Card's native currency code, when available.", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "legacyData": { + "deprecated": true, + "description": "Contains card details represented by legacy system", + "$id": "https://poynt.godaddy.com/schemas/funding-source/card-detail.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "$defs": { + "LegacyCardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "LegacyCardAgreementMetadata": { + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + }, + "description": "Object to represent card agreement metadata. Will hold the agreement template properties, language, country code etc." + }, + "LegacyCardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "LegacyCardKeyData": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + }, + "LegacyCardType": { + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + }, + "LegacyCardKey": { + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + } + }, + "properties": { + "cardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "status": { + "type": "string", + "description": "Status of the card.", + "enum": [ + "ACTIVE", + "REMOVED" + ] + }, + "cardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "cardHolderFullName": { + "type": "string", + "description": "Card holder's full name usually picked from track1.", + "maxLength": 256 + }, + "cardId": { + "type": "string", + "description": "The uuid of the card created" + }, + "encrypted": { + "type": "boolean", + "description": "True if track, PAN, expiration are encrypted." + }, + "encryptedExpirationDate": { + "type": "string", + "description": "If encryption is true, a single encrypted expiration date (containing year, month and possibly date) is provided here." + }, + "expirationDate": { + "type": "integer", + "description": "The date from expiration. Date is typically only present in EMV cards." + }, + "id": { + "type": "integer", + "description": "The id of the card created." + }, + "issuer": { + "type": "string" + }, + "key": { + "description": "List of keys and their versions being used. If encrypted is true, only one of key and keySerialNumber can be populated (not both).", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + } + }, + "numberFirst6": { + "type": "string", + "description": "This is a response field. The first6 numbers of the PAN." + }, + "numberHashed": { + "type": "string" + }, + "numberLast4": { + "type": "string", + "description": "This is a response field. The last4 numbers of the PAN." + }, + "type": { + "description": "The network card belongs to: DISCOVER, VISA, MASTERCARD, AMEX, etc.", + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + } + } + } + }, + "required": [ + "type", + "number", + "source" + ] + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/paze-token.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Paze payment Token", + "description": "Paze Funding source", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-token.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Token Funding Source", + "type": "object", + "description": "Payment Token Funding source", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Verification Data", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/card-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Verification Data", + "description": "Verification data for the card used as funding source", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/token-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token Verification Data", + "description": "Verification data for the token used as funding source", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type representing the type of verification data" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Paze payment token", + "writeOnly": true, + "x-sensitivity": { + "classification": "restricted" + }, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + }, + "cardDetail": { + "description": "Card that was used with the Paze payment token", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "numberHashed": { + "type": "string", + "description": "Card number hashed", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER", + "INTERAC", + "BANCOMAT", + "MAESTRO", + "DINERS_CLUB", + "JCB", + "UNIONPAY", + "BANKAXEPT", + "OTHER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "PAZE", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1data": { + "type": "string", + "writeOnly": true, + "description": "In some use-cases (like airlines) Track1 is required. Track1 contains some extra information over Track2 (like cardholder's name)." + }, + "track2data": { + "type": "string", + "writeOnly": true, + "description": "Required for swiped transactions. Track2 read from the card contains PAN, expiration, etc." + }, + "track3data": { + "type": "string", + "writeOnly": true, + "description": "Track3 for future use. Carries track from custom funding sources." + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-entry-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/interacmac.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "currency": { + "description": "Card's native currency code, when available.", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "legacyData": { + "deprecated": true, + "description": "Contains card details represented by legacy system", + "$id": "https://poynt.godaddy.com/schemas/funding-source/card-detail.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "$defs": { + "LegacyCardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "LegacyCardAgreementMetadata": { + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + }, + "description": "Object to represent card agreement metadata. Will hold the agreement template properties, language, country code etc." + }, + "LegacyCardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "LegacyCardKeyData": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + }, + "LegacyCardType": { + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + }, + "LegacyCardKey": { + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + } + }, + "properties": { + "cardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "status": { + "type": "string", + "description": "Status of the card.", + "enum": [ + "ACTIVE", + "REMOVED" + ] + }, + "cardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "cardHolderFullName": { + "type": "string", + "description": "Card holder's full name usually picked from track1.", + "maxLength": 256 + }, + "cardId": { + "type": "string", + "description": "The uuid of the card created" + }, + "encrypted": { + "type": "boolean", + "description": "True if track, PAN, expiration are encrypted." + }, + "encryptedExpirationDate": { + "type": "string", + "description": "If encryption is true, a single encrypted expiration date (containing year, month and possibly date) is provided here." + }, + "expirationDate": { + "type": "integer", + "description": "The date from expiration. Date is typically only present in EMV cards." + }, + "id": { + "type": "integer", + "description": "The id of the card created." + }, + "issuer": { + "type": "string" + }, + "key": { + "description": "List of keys and their versions being used. If encrypted is true, only one of key and keySerialNumber can be populated (not both).", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + } + }, + "numberFirst6": { + "type": "string", + "description": "This is a response field. The first6 numbers of the PAN." + }, + "numberHashed": { + "type": "string" + }, + "numberLast4": { + "type": "string", + "description": "This is a response field. The last4 numbers of the PAN." + }, + "type": { + "description": "The network card belongs to: DISCOVER, VISA, MASTERCARD, AMEX, etc.", + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + } + } + } + }, + "required": [ + "type", + "number", + "source" + ] + } + } + }, + { + "$id": "https://poynt.godaddy.com/schemas/funding-source/bank-account.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "Bank Account", + "$defs": { + "BankAccountType": { + "type": "string", + "enum": [ + "CHECKING", + "SAVINGS" + ] + }, + "BankAccountHolderType": { + "type": "string", + "enum": [ + "PERSONAL", + "BUSINESS" + ] + } + }, + "type": "object", + "properties": { + "accountNumber": { + "type": "string" + }, + "accountNumberLastFour": { + "type": "string" + }, + "accountType": { + "description": "Enum: CHECKING, SAVINGS.", + "type": "string", + "enum": [ + "CHECKING", + "SAVINGS" + ] + }, + "bankName": { + "type": "string" + }, + "country": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "ownerName": { + "type": "string", + "description": "The owner name of bank account." + }, + "routingNumber": { + "type": "string" + }, + "accountHolderType": { + "description": "Enum: PERSONAL, BUSINESS.", + "type": "string", + "enum": [ + "PERSONAL", + "BUSINESS" + ] + } + }, + "description": "This object represents BankAccount." + }, + { + "$id": "https://poynt.godaddy.com/schemas/funding-source/custom-funding-source.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "Custom Funding source", + "description": "Funding source that can be processed using a specific provider and / or processor", + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "Provider that can handle the funding source", + "maxLength": 64 + }, + "processor": { + "type": "string", + "description": "Processor to be used for the funding source", + "maxLength": 64 + }, + "customFundingType": { + "type": "string", + "description": "Type of the custom funding source", + "maxLength": 64 + }, + "name": { + "type": "string", + "description": "Display name of the funding source", + "maxLength": 64 + }, + "description": { + "type": "string", + "description": "Description about the funding source", + "maxLength": 512 + } + }, + "required": [ + "customFundingType", + "provider" + ] + }, + { + "$id": "https://poynt.godaddy.com/schemas/funding-source/cash.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "Cash Funding Source", + "type": "object", + "properties": null, + "description": "Cash funding source" + } + ], + "discriminator": { + "propertyName": "sourceType", + "mapping": { + "PAYMENT_CARD": "./PaymentCard.yaml", + "EBT_CARD": "./EBTCard.yaml", + "GODADDY": "../payment-token/GoDaddyPaymentToken.yaml", + "APPLE_PAY": "../payment-token/ApplePayPaymentToken.yaml", + "GOOGLE_PAY": "../payment-token/GooglePayPaymentToken.yaml", + "PAZE": "../payment-token/PazePaymentToken.yaml", + "BANK_ACCOUNT": "./BankAccount.yaml", + "CUSTOM": "./CustomFundingSource.yaml", + "CASH": "./Cash.yaml" + } + }, + "properties": { + "sourceType": { + "type": "string", + "description": "Discriminator field representing the type of Funding source" + } + }, + "required": [ + "sourceType" + ] + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/transaction/amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "description": "Simple amount used for processing transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Transaction amount" + }, + "currency": { + "description": "Transaction currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/detailed-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "description": "Itemized amount details used for processing transaction", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/transaction/tip-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "format": "int64", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "description": "Fee associated with transaction", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Fee", + "type": "object", + "description": "Simple fee associated with transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/governed-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Governed Fee", + "description": "Governed fee associated with transaction", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "programType": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "type": { + "type": "string", + "example": "FIXED", + "description": "How the fee should be appliedbinary", + "enum": [ + "FIXED", + "HYBRID", + "PERCENTAGE" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + } + }, + "required": [ + "amount", + "programType", + "type" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + }, + "required": [ + "amountType" + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "voidableUntil": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Time in RFC 3339 format by which this transaction can be voided.", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction-context.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Context", + "type": "object", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/transaction/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Processor Response", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/creditcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "description": "Processor response for credit card", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/processor-response/cv-verification-result.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "description": "CVV verification result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/cv-result-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CVV Verification result status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ] + }, + "approvalCode": { + "type": "string", + "description": "The approval code that came back from the acquirer (usually its 6 alpha-numeric characters).", + "maxLength": 32 + }, + "approvedAmount": { + "type": "integer", + "format": "int64", + "description": "The amount that the authorization was approved for. This could be different from the transactionAmount requested." + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure." + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/debitcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Debit Card Processor Response", + "description": "Processor response for debit card", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/creditcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "description": "Processor response for credit card", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/processor-response/cv-verification-result.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "description": "CVV verification result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/cv-result-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CVV Verification result status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ] + }, + "approvalCode": { + "type": "string", + "description": "The approval code that came back from the acquirer (usually its 6 alpha-numeric characters).", + "maxLength": 32 + }, + "approvedAmount": { + "type": "integer", + "format": "int64", + "description": "The amount that the authorization was approved for. This could be different from the transactionAmount requested." + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure." + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "format": "int64", + "description": "Remaining balance amount" + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string", + "description": "Discriminator field representing the type of processor response" + } + }, + "required": [ + "processorType" + ] + }, + "processingInstructions": { + "description": "Processing instructions to be used while processing transaction", + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction-processing-instruction.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Processing Instruction", + "type": "object", + "properties": { + "authOnly": { + "type": "boolean", + "default": false, + "writeOnly": true, + "description": "Perform authorize only and do not auto capture. Applicable only for AUTHORIZATION type payment" + }, + "partialAuthEnabled": { + "type": "boolean", + "default": true, + "writeOnly": true, + "description": "Allow partial authorizations. Applicable only for AUTHORIZATION and SALE type payment" + }, + "statementDescriptorSuffix": { + "type": "string", + "writeOnly": true, + "description": "Transaction-level statement descriptor suffix. It's optional field. If parent transaction has data it will be used from parent transaction. If not provided then statement descriptor suffix from device/store/business level will be used." + }, + "storeAndForward": { + "type": "boolean", + "default": false, + "description": "Store and forward transaction. Used to identify if the transaction is online or offline" + } + } + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + }, + "legacyMetadata": { + "description": "Transaction metadata represented by legacy system", + "deprecated": true, + "$id": "https://poynt.godaddy.com/schemas/transaction/metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "$defs": { + "LegacyAdjustmentRecord": { + "type": "object", + "properties": { + "amountChanges": { + "description": "Total amount change in this adjustment.", + "$id": "https://godaddy.com/schemas/commerce/transaction/amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "description": "Simple amount used for processing transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Transaction amount" + }, + "currency": { + "description": "Transaction currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/detailed-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "description": "Itemized amount details used for processing transaction", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/transaction/tip-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "format": "int64", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "description": "Fee associated with transaction", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Fee", + "type": "object", + "description": "Simple fee associated with transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/governed-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Governed Fee", + "description": "Governed fee associated with transaction", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "programType": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "type": { + "type": "string", + "example": "FIXED", + "description": "How the fee should be appliedbinary", + "enum": [ + "FIXED", + "HYBRID", + "PERCENTAGE" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + } + }, + "required": [ + "amount", + "programType", + "type" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + }, + "required": [ + "amountType" + ] + }, + "amounts": { + "description": "Total amount after this adjustment.", + "$id": "https://godaddy.com/schemas/commerce/transaction/amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "description": "Simple amount used for processing transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Transaction amount" + }, + "currency": { + "description": "Transaction currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/detailed-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "description": "Itemized amount details used for processing transaction", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/transaction/tip-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "format": "int64", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "description": "Fee associated with transaction", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Fee", + "type": "object", + "description": "Simple fee associated with transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/governed-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Governed Fee", + "description": "Governed fee associated with transaction", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "programType": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "type": { + "type": "string", + "example": "FIXED", + "description": "How the fee should be appliedbinary", + "enum": [ + "FIXED", + "HYBRID", + "PERCENTAGE" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + } + }, + "required": [ + "amount", + "programType", + "type" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + }, + "required": [ + "amountType" + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "This is a response field. The server time (in ISO-8601 format) at which this transaction was initially created. E.g. 2014-09-11T23:14:44Z." + }, + "exchangeRate": { + "type": "object", + "properties": { + "businessId": { + "type": "string" + }, + "cardAmount": { + "type": "integer", + "format": "int64" + }, + "cardCurrency": { + "type": "string", + "minLength": 3, + "maxLength": 3 + }, + "cardTipAmount": { + "type": "integer", + "format": "int64" + }, + "disclaimer": { + "type": "string" + }, + "markupInfo1": { + "type": "string" + }, + "markupInfo2": { + "type": "string" + }, + "markupPercentage": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "rate": { + "type": "integer", + "format": "int64" + }, + "ratePrecision": { + "type": "integer", + "format": "int64" + }, + "requestedAt": { + "type": "string", + "format": "date-time" + }, + "signature": { + "type": "string" + }, + "tipAmount": { + "type": "integer", + "format": "int64" + }, + "txnAmount": { + "type": "integer", + "format": "int64" + }, + "txnCurrency": { + "type": "string", + "minLength": 3, + "maxLength": 3 + } + }, + "description": "Exchange rate used for this adjustment." + }, + "processorResponse": { + "description": "This object includes some important response elements received from the processor.", + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Processor Response", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/creditcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "description": "Processor response for credit card", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/processor-response/cv-verification-result.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "description": "CVV verification result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/cv-result-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CVV Verification result status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ] + }, + "approvalCode": { + "type": "string", + "description": "The approval code that came back from the acquirer (usually its 6 alpha-numeric characters).", + "maxLength": 32 + }, + "approvedAmount": { + "type": "integer", + "format": "int64", + "description": "The amount that the authorization was approved for. This could be different from the transactionAmount requested." + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure." + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/debitcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Debit Card Processor Response", + "description": "Processor response for debit card", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/creditcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "description": "Processor response for credit card", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/processor-response/cv-verification-result.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "description": "CVV verification result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/cv-result-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CVV Verification result status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ] + }, + "approvalCode": { + "type": "string", + "description": "The approval code that came back from the acquirer (usually its 6 alpha-numeric characters).", + "maxLength": 32 + }, + "approvedAmount": { + "type": "integer", + "format": "int64", + "description": "The amount that the authorization was approved for. This could be different from the transactionAmount requested." + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure." + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "format": "int64", + "description": "Remaining balance amount" + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string", + "description": "Discriminator field representing the type of processor response" + } + }, + "required": [ + "processorType" + ] + }, + "reason": { + "type": "object", + "description": "Reason for this adjustment.", + "properties": { + "program": { + "type": "string", + "enum": [ + "NO_SHOW", + "PURCHASE", + "CARD_DEPOSIT", + "DELAYED_CHARGE", + "EXPRESS_SERVICE", + "ASSURED_RESERVATION" + ], + "description": "The reason for the transaction - currently only applicable for lodging." + }, + "programFor": { + "description": "Some programs require this additional programFor list to be populated.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "RESTAURANT", + "GIFT_SHOP", + "MINI_BAR", + "TELEPHONE", + "LAUNDRY", + "OTHER" + ] + } + } + } + }, + "sequence": { + "type": "integer", + "description": "This field indicates the sequence in which this AdjustmentRecord happened in the adjustment history." + }, + "signature": { + "format": "byte", + "type": "string" + }, + "signatureCaptured": { + "type": "boolean", + "description": "Shows whether signature was captured for this adjustment." + }, + "systemTraceAuditNumber": { + "type": "string" + }, + "transactionNumber": { + "type": "string" + } + }, + "description": "This object shows a summary of the adjustment." + }, + "LegacyPoyntLoyalty": { + "type": "object", + "properties": { + "externalId": { + "type": "string" + }, + "loyalty": { + "type": "array", + "items": { + "type": "object", + "properties": { + "businessLoyaltyId": { + "type": "integer", + "format": "int64" + }, + "campaignDescription": { + "type": "string" + }, + "campaignName": { + "type": "string" + }, + "lastIncrement": { + "type": "integer", + "format": "int64" + }, + "loyaltyType": { + "type": "string" + }, + "loyaltyUnit": { + "type": "string" + }, + "nextTier": { + "type": "string" + }, + "points": { + "type": "integer", + "format": "int64" + }, + "pointsRequired": { + "type": "integer", + "format": "int64" + }, + "rewardDescription": { + "type": "string" + }, + "tier": { + "type": "string" + }, + "totalPoints": { + "type": "integer", + "format": "int64" + }, + "totalSpend": { + "type": "integer", + "format": "int64" + }, + "totalVisits": { + "type": "integer", + "format": "int64" + } + } + } + }, + "loyaltyId": { + "type": "integer", + "format": "int64" + }, + "reward": { + "type": "array", + "items": { + "type": "object", + "properties": { + "businessLoyaltyId": { + "type": "integer", + "format": "int64" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "newReward": { + "type": "boolean" + }, + "postText": { + "type": "string" + }, + "preText": { + "type": "string" + }, + "rewardDescription": { + "type": "string" + }, + "rewardId": { + "type": "integer", + "format": "int64" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "integer", + "format": "int64" + } + } + } + } + } + }, + "LegacyPoyntLoyaltyCampaign": { + "type": "object", + "properties": { + "businessLoyaltyId": { + "type": "integer", + "format": "int64" + }, + "campaignDescription": { + "type": "string" + }, + "campaignName": { + "type": "string" + }, + "lastIncrement": { + "type": "integer", + "format": "int64" + }, + "loyaltyType": { + "type": "string" + }, + "loyaltyUnit": { + "type": "string" + }, + "nextTier": { + "type": "string" + }, + "points": { + "type": "integer", + "format": "int64" + }, + "pointsRequired": { + "type": "integer", + "format": "int64" + }, + "rewardDescription": { + "type": "string" + }, + "tier": { + "type": "string" + }, + "totalPoints": { + "type": "integer", + "format": "int64" + }, + "totalSpend": { + "type": "integer", + "format": "int64" + }, + "totalVisits": { + "type": "integer", + "format": "int64" + } + } + }, + "LegacyPoyntLoyaltyReward": { + "type": "object", + "properties": { + "businessLoyaltyId": { + "type": "integer", + "format": "int64" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "newReward": { + "type": "boolean" + }, + "postText": { + "type": "string" + }, + "preText": { + "type": "string" + }, + "rewardDescription": { + "type": "string" + }, + "rewardId": { + "type": "integer", + "format": "int64" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "integer", + "format": "int64" + } + } + } + }, + "properties": { + "actionVoid": { + "type": "boolean" + }, + "adjusted": { + "type": "boolean", + "description": "This is a response only field. This flag will be present on the transaction that was adjusted and its parents. Most processors only allow adjustment on an Authorize transaction, but some do allow adjustment on Sale or Capture too." + }, + "adjustmentHistory": { + "description": "If the transaction has been adjusted (aka updated), this list will show the details of the updates.", + "type": "array", + "items": { + "type": "object", + "properties": { + "amountChanges": { + "description": "Total amount change in this adjustment.", + "$id": "https://godaddy.com/schemas/commerce/transaction/amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "description": "Simple amount used for processing transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Transaction amount" + }, + "currency": { + "description": "Transaction currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/detailed-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "description": "Itemized amount details used for processing transaction", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/transaction/tip-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "format": "int64", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "description": "Fee associated with transaction", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Fee", + "type": "object", + "description": "Simple fee associated with transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/governed-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Governed Fee", + "description": "Governed fee associated with transaction", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "programType": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "type": { + "type": "string", + "example": "FIXED", + "description": "How the fee should be appliedbinary", + "enum": [ + "FIXED", + "HYBRID", + "PERCENTAGE" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + } + }, + "required": [ + "amount", + "programType", + "type" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + }, + "required": [ + "amountType" + ] + }, + "amounts": { + "description": "Total amount after this adjustment.", + "$id": "https://godaddy.com/schemas/commerce/transaction/amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "description": "Simple amount used for processing transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Transaction amount" + }, + "currency": { + "description": "Transaction currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/detailed-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "description": "Itemized amount details used for processing transaction", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/transaction/tip-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "format": "int64", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "description": "Fee associated with transaction", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Fee", + "type": "object", + "description": "Simple fee associated with transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/governed-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Governed Fee", + "description": "Governed fee associated with transaction", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "programType": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "type": { + "type": "string", + "example": "FIXED", + "description": "How the fee should be appliedbinary", + "enum": [ + "FIXED", + "HYBRID", + "PERCENTAGE" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + } + }, + "required": [ + "amount", + "programType", + "type" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + }, + "required": [ + "amountType" + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "This is a response field. The server time (in ISO-8601 format) at which this transaction was initially created. E.g. 2014-09-11T23:14:44Z." + }, + "exchangeRate": { + "type": "object", + "properties": { + "businessId": { + "type": "string" + }, + "cardAmount": { + "type": "integer", + "format": "int64" + }, + "cardCurrency": { + "type": "string", + "minLength": 3, + "maxLength": 3 + }, + "cardTipAmount": { + "type": "integer", + "format": "int64" + }, + "disclaimer": { + "type": "string" + }, + "markupInfo1": { + "type": "string" + }, + "markupInfo2": { + "type": "string" + }, + "markupPercentage": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "rate": { + "type": "integer", + "format": "int64" + }, + "ratePrecision": { + "type": "integer", + "format": "int64" + }, + "requestedAt": { + "type": "string", + "format": "date-time" + }, + "signature": { + "type": "string" + }, + "tipAmount": { + "type": "integer", + "format": "int64" + }, + "txnAmount": { + "type": "integer", + "format": "int64" + }, + "txnCurrency": { + "type": "string", + "minLength": 3, + "maxLength": 3 + } + }, + "description": "Exchange rate used for this adjustment." + }, + "processorResponse": { + "description": "This object includes some important response elements received from the processor.", + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Processor Response", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/creditcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "description": "Processor response for credit card", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/processor-response/cv-verification-result.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "description": "CVV verification result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/cv-result-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CVV Verification result status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ] + }, + "approvalCode": { + "type": "string", + "description": "The approval code that came back from the acquirer (usually its 6 alpha-numeric characters).", + "maxLength": 32 + }, + "approvedAmount": { + "type": "integer", + "format": "int64", + "description": "The amount that the authorization was approved for. This could be different from the transactionAmount requested." + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure." + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/debitcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Debit Card Processor Response", + "description": "Processor response for debit card", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/creditcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "description": "Processor response for credit card", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/processor-response/cv-verification-result.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "description": "CVV verification result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/cv-result-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CVV Verification result status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ] + }, + "approvalCode": { + "type": "string", + "description": "The approval code that came back from the acquirer (usually its 6 alpha-numeric characters).", + "maxLength": 32 + }, + "approvedAmount": { + "type": "integer", + "format": "int64", + "description": "The amount that the authorization was approved for. This could be different from the transactionAmount requested." + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure." + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "format": "int64", + "description": "Remaining balance amount" + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string", + "description": "Discriminator field representing the type of processor response" + } + }, + "required": [ + "processorType" + ] + }, + "reason": { + "type": "object", + "description": "Reason for this adjustment.", + "properties": { + "program": { + "type": "string", + "enum": [ + "NO_SHOW", + "PURCHASE", + "CARD_DEPOSIT", + "DELAYED_CHARGE", + "EXPRESS_SERVICE", + "ASSURED_RESERVATION" + ], + "description": "The reason for the transaction - currently only applicable for lodging." + }, + "programFor": { + "description": "Some programs require this additional programFor list to be populated.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "RESTAURANT", + "GIFT_SHOP", + "MINI_BAR", + "TELEPHONE", + "LAUNDRY", + "OTHER" + ] + } + } + } + }, + "sequence": { + "type": "integer", + "description": "This field indicates the sequence in which this AdjustmentRecord happened in the adjustment history." + }, + "signature": { + "format": "byte", + "type": "string" + }, + "signatureCaptured": { + "type": "boolean", + "description": "Shows whether signature was captured for this adjustment." + }, + "systemTraceAuditNumber": { + "type": "string" + }, + "transactionNumber": { + "type": "string" + } + }, + "description": "This object shows a summary of the adjustment." + } + }, + "amountsAdjusted": { + "type": "boolean" + }, + "approvalCode": { + "type": "string", + "description": "An approval code received over the phone (in case of terminal going offline) can be passed here as part of a SALE transaction. This process in the industry is often referred to as forced post or forced sale.", + "maxLength": 32 + }, + "authOnly": { + "type": "boolean", + "description": "This is an in/out field. If not passed, it will default to false. This tells the terminal to only authorize and wait for the merchant to capture it." + }, + "chargebackStatus": { + "type": "string", + "enum": [ + "CREATED", + "DISPUTED", + "MERCHANT_WON", + "MERCHANT_LOST" + ] + }, + "context": { + "description": "[Required] Contains context about the transaction. TransmissionAtLocal must be provided. All other fields are optional.", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "customerLanguage": { + "type": "string", + "description": "The customer's language preference for the transaction.", + "minLength": 2, + "maxLength": 2 + }, + "customerUserId": { + "type": "integer", + "format": "int64", + "description": "A Poynt generated customer id that is returned in the response. This id is only assigned only to a customer performing a card transaction." + }, + "emailReceipt": { + "type": "boolean" + }, + "intent": { + "type": "string", + "description": "This field is used to inform the transaction intent. Client must use this field wherever applicable for better approval rate.", + "enum": [ + "UNSCHEDULED_COF_TXN", + "RECURRING_COF_TXN", + "INSTALLMENT_COF_TXN" + ] + }, + "partialAuthEnabled": { + "type": "boolean" + }, + "partiallyApproved": { + "type": "boolean" + }, + "paymentTokenUsed": { + "type": "boolean", + "description": "This means that transaction was processed with payment token." + }, + "pinCaptured": { + "type": "boolean" + }, + "poyntLoyalty": { + "type": "object", + "properties": { + "externalId": { + "type": "string" + }, + "loyalty": { + "type": "array", + "items": { + "type": "object", + "properties": { + "businessLoyaltyId": { + "type": "integer", + "format": "int64" + }, + "campaignDescription": { + "type": "string" + }, + "campaignName": { + "type": "string" + }, + "lastIncrement": { + "type": "integer", + "format": "int64" + }, + "loyaltyType": { + "type": "string" + }, + "loyaltyUnit": { + "type": "string" + }, + "nextTier": { + "type": "string" + }, + "points": { + "type": "integer", + "format": "int64" + }, + "pointsRequired": { + "type": "integer", + "format": "int64" + }, + "rewardDescription": { + "type": "string" + }, + "tier": { + "type": "string" + }, + "totalPoints": { + "type": "integer", + "format": "int64" + }, + "totalSpend": { + "type": "integer", + "format": "int64" + }, + "totalVisits": { + "type": "integer", + "format": "int64" + } + } + } + }, + "loyaltyId": { + "type": "integer", + "format": "int64" + }, + "reward": { + "type": "array", + "items": { + "type": "object", + "properties": { + "businessLoyaltyId": { + "type": "integer", + "format": "int64" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "newReward": { + "type": "boolean" + }, + "postText": { + "type": "string" + }, + "preText": { + "type": "string" + }, + "rewardDescription": { + "type": "string" + }, + "rewardId": { + "type": "integer", + "format": "int64" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "integer", + "format": "int64" + } + } + } + } + } + }, + "processorOptions": { + "description": "A name/value pair list that could be persisted and later retreived - primarily to store additional payment related data that get passed through to the processor.", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorTransactionId": { + "type": "string", + "description": "The capability to enter a transaction id along with approval code.", + "maxLength": 64 + }, + "reason": { + "type": "object", + "properties": { + "program": { + "type": "string", + "enum": [ + "NO_SHOW", + "PURCHASE", + "CARD_DEPOSIT", + "DELAYED_CHARGE", + "EXPRESS_SERVICE", + "ASSURED_RESERVATION" + ], + "description": "The reason for the transaction - currently only applicable for lodging." + }, + "programFor": { + "description": "Some programs require this additional programFor list to be populated.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "RESTAURANT", + "GIFT_SHOP", + "MINI_BAR", + "TELEPHONE", + "LAUNDRY", + "OTHER" + ] + } + } + }, + "description": "Reason for transaction - currently only applicable for lodging." + }, + "receiptEmailAddress": { + "type": "string", + "description": "Email address collected from the customer.", + "maxLength": 512 + }, + "receiptPhone": { + "type": "object", + "properties": { + "areaCode": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "extensionNumber": { + "type": "string" + }, + "id": { + "type": "integer", + "format": "int64" + }, + "ituCountryCode": { + "type": "string" + }, + "localPhoneNumber": { + "type": "string" + }, + "primaryDayTime": { + "type": "boolean" + }, + "primaryEvening": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "ADDED", + "CONFIRMED" + ] + }, + "type": { + "type": "string", + "enum": [ + "HOME", + "WORK", + "BUSINESS", + "MOBILE", + "FAX", + "PAGER", + "RECEIPT", + "OTHER" + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "description": "Phone collected from the customer to SMS receipt." + }, + "references": { + "description": "References to orders/invoices that this transaction is for.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction-reference.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Reference", + "type": "object", + "description": "Reference to a document (e.g. order or invoice) that this transaction is for", + "properties": { + "value": { + "type": "string", + "maxLength": 128 + }, + "type": { + "type": "string", + "maxLength": 32 + }, + "additionalLabel": { + "description": "(Optional) Label that the reference points to", + "type": "string", + "maxLength": 32 + } + }, + "required": [ + "value", + "type" + ] + } + }, + "reversalVoid": { + "type": "boolean" + }, + "saveCardOnFile": { + "type": "boolean", + "description": "This boolean field is used to inform if user wants to save card on file with this transaction. Client must use this field wherever applicable for better approval rate." + }, + "settled": { + "type": "boolean" + }, + "settlementStatus": { + "type": "string", + "description": "Represents settlement status of transaction.", + "maxLength": 32 + }, + "shippingAddress": { + "type": "object", + "properties": { + "city": { + "type": "string", + "maxLength": 64 + }, + "countryCode": { + "type": "string", + "maxLength": 3 + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The time (in ISO-8601 format) at which the address was created. E.g. 2014-09-11T23:14:44Z." + }, + "id": { + "type": "integer", + "format": "int64" + }, + "line1": { + "type": "string", + "maxLength": 128 + }, + "line2": { + "type": "string", + "maxLength": 128 + }, + "postalCode": { + "type": "string", + "maxLength": 16 + }, + "postalCodeExtension": { + "type": "string", + "maxLength": 16 + }, + "primary": { + "type": "boolean" + }, + "status": { + "type": "string", + "const": "ADDED" + }, + "territory": { + "type": "string", + "maxLength": 64 + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "TerritoryType enum and territory go hand in hand. This enum specifies what kind of territory is in the territory field. E.g. in the US, this will typically be STATE." + }, + "type": { + "type": "string", + "enum": [ + "HOME", + "WORK", + "BUSINESS", + "TRANSACTION", + "OTHER" + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "The time (in ISO-8601 format) at which the address was updated. E.g. 2014-09-11T23:14:44Z." + } + }, + "description": "A shipping address associated with the transaction." + }, + "signature": { + "description": "Signature collected from the customer.", + "format": "byte", + "type": "string" + }, + "signatureCaptured": { + "type": "boolean", + "description": "This is a response field. This field could be used by the client to inform that signature has or will soon be captured. The server uses this field to inform whether a signature has been captured." + }, + "signatureRequired": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "CREATED", + "SAVED", + "AUTHORIZED", + "PENDING", + "PARTIALLY_CAPTURED", + "CAPTURED", + "DECLINED", + "PARTIALLY_CAPTURED_AND_PARTIALLY_REFUNDED", + "PARTIALLY_REFUNDED", + "REFUNDED", + "VOIDED", + "STEP_UP" + ], + "description": "If funding source is CASH, only CAPTURED and REFUNDED are the possible options. The SAVE feature is not applicable to CASH." + }, + "stayType": { + "type": "string", + "enum": [ + "GENERAL_CONTAINER", + "REGULAR_STAY", + "QUICK_STAY", + "NON_LODGING_SALE", + "NON_LODGING_NRR" + ] + }, + "systemTraceAuditNumber": { + "type": "string", + "description": "This is a unique number per transaction session generated by the terminal.", + "minLength": 1, + "maxLength": 6 + }, + "voided": { + "type": "boolean" + } + } + }, + "references": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction-reference.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Reference", + "type": "object", + "description": "Reference to a document (e.g. order or invoice) that this transaction is for", + "properties": { + "value": { + "type": "string", + "maxLength": 128 + }, + "type": { + "type": "string", + "maxLength": 32 + }, + "additionalLabel": { + "description": "(Optional) Label that the reference points to", + "type": "string", + "maxLength": 32 + } + }, + "required": [ + "value", + "type" + ] + }, + "description": "References to the transaction" + }, + "links": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target.", + "type": "string", + "format": "uri" + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "rel", + "href" + ] + }, + "description": "Links associated with this transaction" + } + }, + "required": [ + "type", + "amount", + "createdAt" + ] }, "type": "array" } @@ -130,10 +15340,136 @@ } }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schema/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schema/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target.", + "type": "string", + "format": "uri" + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.transaction:read", "commerce.transaction:write"] + "scopes": [ + "commerce.transaction:read", + "commerce.transaction:write" + ] }, { "operationId": "getTransactionById", @@ -147,7 +15483,14 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Uuid.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true } }, { @@ -155,7 +15498,16 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Id.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom ID format that can take URN or an UUID", + "type": "string", + "example": "urn:trn:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", + "x-custom-type": true, + "x-custom-id": true } }, { @@ -172,14 +15524,15276 @@ "200": { "description": "Transaction Found", "schema": { - "$ref": "./models/transaction/Transaction.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction", + "type": "object", + "description": "Transaction details", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/authorization.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Authorization Transaction", + "type": "object", + "x-generic-type": "Transaction", + "description": "Represents authorization transaction against a payment", + "properties": { + "captureBy": { + "type": "string", + "description": "Time by which the Authorization transaction should be captured (RFC 3339 format).", + "format": "date-time", + "readOnly": true, + "example": "2022-07-21T17:32:28Z" + }, + "updatedAt": { + "deprecated": true, + "type": "string", + "format": "date-time", + "description": "Updated time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/capture.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Capture Transaction", + "type": "object", + "x-generic-type": "Transaction", + "description": "Represents capture transaction against a payment", + "properties": { + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/transaction/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom ID format that can take URN or an UUID", + "type": "string", + "example": "urn:trn:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", + "x-custom-type": true, + "x-custom-id": true + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/refund.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Refund Transaction", + "type": "object", + "x-generic-type": "Transaction", + "description": "Represents refund transaction against a payment", + "properties": { + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/transaction/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom ID format that can take URN or an UUID", + "type": "string", + "example": "urn:trn:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", + "x-custom-type": true, + "x-custom-id": true + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/adjustment.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Adjustment Transaction", + "type": "object", + "x-generic-type": "Transaction", + "description": "Represents Adjustment transaction against a payment", + "properties": { + "newAmount": { + "description": "Adjusted transaction amount", + "$id": "https://godaddy.com/schemas/commerce/transaction/amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "description": "Simple amount used for processing transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Transaction amount" + }, + "currency": { + "description": "Transaction currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/detailed-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "description": "Itemized amount details used for processing transaction", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/transaction/tip-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "format": "int64", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "description": "Fee associated with transaction", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Fee", + "type": "object", + "description": "Simple fee associated with transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/governed-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Governed Fee", + "description": "Governed fee associated with transaction", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "programType": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "type": { + "type": "string", + "example": "FIXED", + "description": "How the fee should be appliedbinary", + "enum": [ + "FIXED", + "HYBRID", + "PERCENTAGE" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + } + }, + "required": [ + "amount", + "programType", + "type" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + }, + "required": [ + "amountType" + ] + }, + "parentTransactionId": { + "$id": "https://godaddy.com/schemas/commerce/transaction/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom ID format that can take URN or an UUID", + "type": "string", + "example": "urn:trn:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", + "x-custom-type": true, + "x-custom-id": true + } + }, + "required": [ + "newAmount" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/sale.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Sale Transaction", + "type": "object", + "x-generic-type": "Transaction", + "description": "Represents sale transaction against a payment", + "properties": { + "updatedAt": { + "deprecated": true, + "type": "string", + "format": "date-time", + "description": "Updated time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "AUTHORIZE": "./Authorization.yaml", + "CAPTURE": "./Capture.yaml", + "REFUND": "./Refund.yaml", + "ADJUSTMENT": "./Adjustment.yaml", + "SALE": "./Sale.yaml" + } + }, + "x-generic-type": "Transaction", + "properties": { + "type": { + "type": "string", + "description": "Discriminator field representing the type of Transaction" + }, + "transactionId": { + "$id": "https://godaddy.com/schemas/commerce/transaction/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom ID format that can take URN or an UUID", + "type": "string", + "example": "urn:trn:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", + "x-custom-type": true, + "x-custom-id": true + }, + "transactionRefNum": { + "$id": "https://godaddy.com/schemas/commerce/transaction/refnum.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ReferenceNumber", + "description": "reference number (UUID format)", + "type": "string", + "format": "uuid", + "x-custom-type": true, + "x-custom-refnum": true + }, + "storeId": { + "$id": "https://godaddy.com/schemas/commerce/transaction/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "fundingSource": { + "description": "Funding source", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Funding Source", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Card", + "type": "object", + "description": "Payment card", + "properties": { + "cardDetail": { + "description": "Card detail", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "numberHashed": { + "type": "string", + "description": "Card number hashed", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER", + "INTERAC", + "BANCOMAT", + "MAESTRO", + "DINERS_CLUB", + "JCB", + "UNIONPAY", + "BANKAXEPT", + "OTHER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "PAZE", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1data": { + "type": "string", + "writeOnly": true, + "description": "In some use-cases (like airlines) Track1 is required. Track1 contains some extra information over Track2 (like cardholder's name)." + }, + "track2data": { + "type": "string", + "writeOnly": true, + "description": "Required for swiped transactions. Track2 read from the card contains PAN, expiration, etc." + }, + "track3data": { + "type": "string", + "writeOnly": true, + "description": "Track3 for future use. Carries track from custom funding sources." + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-entry-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/interacmac.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "currency": { + "description": "Card's native currency code, when available.", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "legacyData": { + "deprecated": true, + "description": "Contains card details represented by legacy system", + "$id": "https://poynt.godaddy.com/schemas/funding-source/card-detail.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "$defs": { + "LegacyCardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "LegacyCardAgreementMetadata": { + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + }, + "description": "Object to represent card agreement metadata. Will hold the agreement template properties, language, country code etc." + }, + "LegacyCardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "LegacyCardKeyData": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + }, + "LegacyCardType": { + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + }, + "LegacyCardKey": { + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + } + }, + "properties": { + "cardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "status": { + "type": "string", + "description": "Status of the card.", + "enum": [ + "ACTIVE", + "REMOVED" + ] + }, + "cardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "cardHolderFullName": { + "type": "string", + "description": "Card holder's full name usually picked from track1.", + "maxLength": 256 + }, + "cardId": { + "type": "string", + "description": "The uuid of the card created" + }, + "encrypted": { + "type": "boolean", + "description": "True if track, PAN, expiration are encrypted." + }, + "encryptedExpirationDate": { + "type": "string", + "description": "If encryption is true, a single encrypted expiration date (containing year, month and possibly date) is provided here." + }, + "expirationDate": { + "type": "integer", + "description": "The date from expiration. Date is typically only present in EMV cards." + }, + "id": { + "type": "integer", + "description": "The id of the card created." + }, + "issuer": { + "type": "string" + }, + "key": { + "description": "List of keys and their versions being used. If encrypted is true, only one of key and keySerialNumber can be populated (not both).", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + } + }, + "numberFirst6": { + "type": "string", + "description": "This is a response field. The first6 numbers of the PAN." + }, + "numberHashed": { + "type": "string" + }, + "numberLast4": { + "type": "string", + "description": "This is a response field. The last4 numbers of the PAN." + }, + "type": { + "description": "The network card belongs to: DISCOVER, VISA, MASTERCARD, AMEX, etc.", + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + } + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "writeOnly": true, + "description": "Verification data that can be used to verify the customer information", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Verification Data", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/card-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Verification Data", + "description": "Verification data for the card used as funding source", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/token-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token Verification Data", + "description": "Verification data for the token used as funding source", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type representing the type of verification data" + } + }, + "required": [ + "type" + ] + }, + "processingInstruction": { + "writeOnly": true, + "description": "Processing instruction to use this funding source", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/card-processing-instruction.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processing Instruction", + "type": "object", + "properties": { + "signatureRequired": { + "type": "boolean", + "default": false, + "description": "If signature is required for this transaction" + }, + "debit": { + "type": "boolean", + "default": false, + "description": "If card should be processed as debit or not" + } + } + } + }, + "required": [ + "cardDetail" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/ebt-card.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "EBT Card", + "type": "object", + "description": "EBT Card", + "properties": { + "cardDetail": { + "description": "Card detail", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "numberHashed": { + "type": "string", + "description": "Card number hashed", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER", + "INTERAC", + "BANCOMAT", + "MAESTRO", + "DINERS_CLUB", + "JCB", + "UNIONPAY", + "BANKAXEPT", + "OTHER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "PAZE", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1data": { + "type": "string", + "writeOnly": true, + "description": "In some use-cases (like airlines) Track1 is required. Track1 contains some extra information over Track2 (like cardholder's name)." + }, + "track2data": { + "type": "string", + "writeOnly": true, + "description": "Required for swiped transactions. Track2 read from the card contains PAN, expiration, etc." + }, + "track3data": { + "type": "string", + "writeOnly": true, + "description": "Track3 for future use. Carries track from custom funding sources." + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-entry-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/interacmac.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "currency": { + "description": "Card's native currency code, when available.", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "legacyData": { + "deprecated": true, + "description": "Contains card details represented by legacy system", + "$id": "https://poynt.godaddy.com/schemas/funding-source/card-detail.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "$defs": { + "LegacyCardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "LegacyCardAgreementMetadata": { + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + }, + "description": "Object to represent card agreement metadata. Will hold the agreement template properties, language, country code etc." + }, + "LegacyCardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "LegacyCardKeyData": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + }, + "LegacyCardType": { + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + }, + "LegacyCardKey": { + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + } + }, + "properties": { + "cardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "status": { + "type": "string", + "description": "Status of the card.", + "enum": [ + "ACTIVE", + "REMOVED" + ] + }, + "cardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "cardHolderFullName": { + "type": "string", + "description": "Card holder's full name usually picked from track1.", + "maxLength": 256 + }, + "cardId": { + "type": "string", + "description": "The uuid of the card created" + }, + "encrypted": { + "type": "boolean", + "description": "True if track, PAN, expiration are encrypted." + }, + "encryptedExpirationDate": { + "type": "string", + "description": "If encryption is true, a single encrypted expiration date (containing year, month and possibly date) is provided here." + }, + "expirationDate": { + "type": "integer", + "description": "The date from expiration. Date is typically only present in EMV cards." + }, + "id": { + "type": "integer", + "description": "The id of the card created." + }, + "issuer": { + "type": "string" + }, + "key": { + "description": "List of keys and their versions being used. If encrypted is true, only one of key and keySerialNumber can be populated (not both).", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + } + }, + "numberFirst6": { + "type": "string", + "description": "This is a response field. The first6 numbers of the PAN." + }, + "numberHashed": { + "type": "string" + }, + "numberLast4": { + "type": "string", + "description": "This is a response field. The last4 numbers of the PAN." + }, + "type": { + "description": "The network card belongs to: DISCOVER, VISA, MASTERCARD, AMEX, etc.", + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + } + } + } + }, + "required": [ + "type", + "number", + "source" + ] + }, + "cardVerificationData": { + "description": "Card verification data", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Verification Data", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/card-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Verification Data", + "description": "Verification data for the card used as funding source", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/token-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token Verification Data", + "description": "Verification data for the token used as funding source", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type representing the type of verification data" + } + }, + "required": [ + "type" + ] + }, + "cardType": { + "type": "string", + "description": "Type of EBT card used", + "enum": [ + "FOOD_STAMP", + "CASH_BENEFIT", + "ELECTRONIC_VOUCHER" + ] + }, + "eVoucherSerial": { + "type": "string", + "minLength": 1, + "maxLength": 15, + "description": "EVoucher serial if used with Electronic Voucher" + }, + "eVoucherApprovalCode": { + "type": "string", + "minLength": 6, + "maxLength": 6, + "description": "EVoucher Approval code if used with Electronic Voucher" + } + }, + "required": [ + "cardDetail", + "cardType" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/godaddy-payment-token.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GoDaddy Payment Token", + "description": "GoDaddy Card-on-file Funding source", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-token.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Token Funding Source", + "type": "object", + "description": "Payment Token Funding source", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Verification Data", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/card-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Verification Data", + "description": "Verification data for the card used as funding source", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/token-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token Verification Data", + "description": "Verification data for the token used as funding source", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type representing the type of verification data" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Godaddy Payment token", + "writeOnly": true, + "x-sensitivity": { + "classification": "restricted" + }, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + }, + "cardDetail": { + "description": "Card that was used with the Godaddy payment token", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "numberHashed": { + "type": "string", + "description": "Card number hashed", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER", + "INTERAC", + "BANCOMAT", + "MAESTRO", + "DINERS_CLUB", + "JCB", + "UNIONPAY", + "BANKAXEPT", + "OTHER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "PAZE", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1data": { + "type": "string", + "writeOnly": true, + "description": "In some use-cases (like airlines) Track1 is required. Track1 contains some extra information over Track2 (like cardholder's name)." + }, + "track2data": { + "type": "string", + "writeOnly": true, + "description": "Required for swiped transactions. Track2 read from the card contains PAN, expiration, etc." + }, + "track3data": { + "type": "string", + "writeOnly": true, + "description": "Track3 for future use. Carries track from custom funding sources." + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-entry-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/interacmac.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "currency": { + "description": "Card's native currency code, when available.", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "legacyData": { + "deprecated": true, + "description": "Contains card details represented by legacy system", + "$id": "https://poynt.godaddy.com/schemas/funding-source/card-detail.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "$defs": { + "LegacyCardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "LegacyCardAgreementMetadata": { + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + }, + "description": "Object to represent card agreement metadata. Will hold the agreement template properties, language, country code etc." + }, + "LegacyCardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "LegacyCardKeyData": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + }, + "LegacyCardType": { + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + }, + "LegacyCardKey": { + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + } + }, + "properties": { + "cardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "status": { + "type": "string", + "description": "Status of the card.", + "enum": [ + "ACTIVE", + "REMOVED" + ] + }, + "cardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "cardHolderFullName": { + "type": "string", + "description": "Card holder's full name usually picked from track1.", + "maxLength": 256 + }, + "cardId": { + "type": "string", + "description": "The uuid of the card created" + }, + "encrypted": { + "type": "boolean", + "description": "True if track, PAN, expiration are encrypted." + }, + "encryptedExpirationDate": { + "type": "string", + "description": "If encryption is true, a single encrypted expiration date (containing year, month and possibly date) is provided here." + }, + "expirationDate": { + "type": "integer", + "description": "The date from expiration. Date is typically only present in EMV cards." + }, + "id": { + "type": "integer", + "description": "The id of the card created." + }, + "issuer": { + "type": "string" + }, + "key": { + "description": "List of keys and their versions being used. If encrypted is true, only one of key and keySerialNumber can be populated (not both).", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + } + }, + "numberFirst6": { + "type": "string", + "description": "This is a response field. The first6 numbers of the PAN." + }, + "numberHashed": { + "type": "string" + }, + "numberLast4": { + "type": "string", + "description": "This is a response field. The last4 numbers of the PAN." + }, + "type": { + "description": "The network card belongs to: DISCOVER, VISA, MASTERCARD, AMEX, etc.", + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + } + } + } + }, + "required": [ + "type", + "number", + "source" + ] + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/applepay-token.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ApplePay Payment Token", + "type": "object", + "description": "ApplePay Funding source", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-token.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Token Funding Source", + "type": "object", + "description": "Payment Token Funding source", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Verification Data", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/card-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Verification Data", + "description": "Verification data for the card used as funding source", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/token-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token Verification Data", + "description": "Verification data for the token used as funding source", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type representing the type of verification data" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Apple pay token", + "writeOnly": true, + "x-sensitivity": { + "classification": "restricted" + }, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + }, + "cardDetail": { + "description": "Card that was used with the Apple pay token", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "numberHashed": { + "type": "string", + "description": "Card number hashed", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER", + "INTERAC", + "BANCOMAT", + "MAESTRO", + "DINERS_CLUB", + "JCB", + "UNIONPAY", + "BANKAXEPT", + "OTHER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "PAZE", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1data": { + "type": "string", + "writeOnly": true, + "description": "In some use-cases (like airlines) Track1 is required. Track1 contains some extra information over Track2 (like cardholder's name)." + }, + "track2data": { + "type": "string", + "writeOnly": true, + "description": "Required for swiped transactions. Track2 read from the card contains PAN, expiration, etc." + }, + "track3data": { + "type": "string", + "writeOnly": true, + "description": "Track3 for future use. Carries track from custom funding sources." + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-entry-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/interacmac.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "currency": { + "description": "Card's native currency code, when available.", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "legacyData": { + "deprecated": true, + "description": "Contains card details represented by legacy system", + "$id": "https://poynt.godaddy.com/schemas/funding-source/card-detail.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "$defs": { + "LegacyCardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "LegacyCardAgreementMetadata": { + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + }, + "description": "Object to represent card agreement metadata. Will hold the agreement template properties, language, country code etc." + }, + "LegacyCardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "LegacyCardKeyData": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + }, + "LegacyCardType": { + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + }, + "LegacyCardKey": { + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + } + }, + "properties": { + "cardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "status": { + "type": "string", + "description": "Status of the card.", + "enum": [ + "ACTIVE", + "REMOVED" + ] + }, + "cardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "cardHolderFullName": { + "type": "string", + "description": "Card holder's full name usually picked from track1.", + "maxLength": 256 + }, + "cardId": { + "type": "string", + "description": "The uuid of the card created" + }, + "encrypted": { + "type": "boolean", + "description": "True if track, PAN, expiration are encrypted." + }, + "encryptedExpirationDate": { + "type": "string", + "description": "If encryption is true, a single encrypted expiration date (containing year, month and possibly date) is provided here." + }, + "expirationDate": { + "type": "integer", + "description": "The date from expiration. Date is typically only present in EMV cards." + }, + "id": { + "type": "integer", + "description": "The id of the card created." + }, + "issuer": { + "type": "string" + }, + "key": { + "description": "List of keys and their versions being used. If encrypted is true, only one of key and keySerialNumber can be populated (not both).", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + } + }, + "numberFirst6": { + "type": "string", + "description": "This is a response field. The first6 numbers of the PAN." + }, + "numberHashed": { + "type": "string" + }, + "numberLast4": { + "type": "string", + "description": "This is a response field. The last4 numbers of the PAN." + }, + "type": { + "description": "The network card belongs to: DISCOVER, VISA, MASTERCARD, AMEX, etc.", + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + } + } + } + }, + "required": [ + "type", + "number", + "source" + ] + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/google-pay-token.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "GooglePay Payment Token", + "description": "GooglePay Funding source", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-token.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Token Funding Source", + "type": "object", + "description": "Payment Token Funding source", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Verification Data", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/card-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Verification Data", + "description": "Verification data for the card used as funding source", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/token-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token Verification Data", + "description": "Verification data for the token used as funding source", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type representing the type of verification data" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Google pay token", + "writeOnly": true, + "x-sensitivity": { + "classification": "restricted" + }, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + }, + "cardDetail": { + "description": "Card that was used with the Google pay token", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "numberHashed": { + "type": "string", + "description": "Card number hashed", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER", + "INTERAC", + "BANCOMAT", + "MAESTRO", + "DINERS_CLUB", + "JCB", + "UNIONPAY", + "BANKAXEPT", + "OTHER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "PAZE", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1data": { + "type": "string", + "writeOnly": true, + "description": "In some use-cases (like airlines) Track1 is required. Track1 contains some extra information over Track2 (like cardholder's name)." + }, + "track2data": { + "type": "string", + "writeOnly": true, + "description": "Required for swiped transactions. Track2 read from the card contains PAN, expiration, etc." + }, + "track3data": { + "type": "string", + "writeOnly": true, + "description": "Track3 for future use. Carries track from custom funding sources." + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-entry-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/interacmac.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "currency": { + "description": "Card's native currency code, when available.", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "legacyData": { + "deprecated": true, + "description": "Contains card details represented by legacy system", + "$id": "https://poynt.godaddy.com/schemas/funding-source/card-detail.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "$defs": { + "LegacyCardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "LegacyCardAgreementMetadata": { + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + }, + "description": "Object to represent card agreement metadata. Will hold the agreement template properties, language, country code etc." + }, + "LegacyCardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "LegacyCardKeyData": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + }, + "LegacyCardType": { + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + }, + "LegacyCardKey": { + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + } + }, + "properties": { + "cardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "status": { + "type": "string", + "description": "Status of the card.", + "enum": [ + "ACTIVE", + "REMOVED" + ] + }, + "cardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "cardHolderFullName": { + "type": "string", + "description": "Card holder's full name usually picked from track1.", + "maxLength": 256 + }, + "cardId": { + "type": "string", + "description": "The uuid of the card created" + }, + "encrypted": { + "type": "boolean", + "description": "True if track, PAN, expiration are encrypted." + }, + "encryptedExpirationDate": { + "type": "string", + "description": "If encryption is true, a single encrypted expiration date (containing year, month and possibly date) is provided here." + }, + "expirationDate": { + "type": "integer", + "description": "The date from expiration. Date is typically only present in EMV cards." + }, + "id": { + "type": "integer", + "description": "The id of the card created." + }, + "issuer": { + "type": "string" + }, + "key": { + "description": "List of keys and their versions being used. If encrypted is true, only one of key and keySerialNumber can be populated (not both).", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + } + }, + "numberFirst6": { + "type": "string", + "description": "This is a response field. The first6 numbers of the PAN." + }, + "numberHashed": { + "type": "string" + }, + "numberLast4": { + "type": "string", + "description": "This is a response field. The last4 numbers of the PAN." + }, + "type": { + "description": "The network card belongs to: DISCOVER, VISA, MASTERCARD, AMEX, etc.", + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + } + } + } + }, + "required": [ + "type", + "number", + "source" + ] + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/paze-token.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Paze payment Token", + "description": "Paze Funding source", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-token.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Payment Token Funding Source", + "type": "object", + "description": "Payment Token Funding source", + "properties": { + "verificationData": { + "description": "Verification data", + "writeOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Verification Data", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/card-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Verification Data", + "description": "Verification data for the card used as funding source", + "type": "object", + "properties": { + "cardPin": { + "type": "string", + "description": "Card pin block.", + "writeOnly": true + }, + "cardPinKeySerialNumber": { + "type": "string", + "description": "The acquirer's KeySerialNumber (KSN) corresponding to the pin-block", + "writeOnly": true + }, + "cvSkipReason": { + "type": "string", + "description": "CVV skipped because of this reason.", + "writeOnly": true + }, + "cvData": { + "type": "string", + "description": "CVV information typically at the back of the card.", + "writeOnly": true + }, + "cardHolderBillingAddress": { + "description": "Address for AVS", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + }, + "threeDSecureData": { + "description": "3d secure data information", + "writeOnly": true, + "type": "object", + "properties": { + "eci": { + "type": "string" + }, + "cryptogram": { + "type": "string" + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/token-verification.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Token Verification Data", + "description": "Verification data for the token used as funding source", + "type": "object", + "properties": { + "billingAddress": { + "description": "Address for verification", + "writeOnly": true, + "$id": "https://godaddy.com/schema/common/address.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Postal Address (Medium-Grained)", + "properties": { + "addressLine1": { + "type": "string", + "description": "The first line of the address. For example, number and street name. For example, `3032 Bunker Hill Lane`. Required for compliance and risk checks. Must contain the full address.", + "maxLength": 300 + }, + "addressLine2": { + "type": "string", + "description": "The second line of the address. For example, office suite or apartment number.", + "maxLength": 300 + }, + "addressLine3": { + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil; direction text, such as `next to Opera House`; or a landmark reference in an Indian address.", + "maxLength": 100 + }, + "adminArea4": { + "description": "The neighborhood, ward, or district. Smaller than `adminArea3` or `subLocality`. For example, the postal sorting code that is used in Guernsey and many French territories, such as French Guiana; the fine-grained administrative levels in China.", + "type": "string", + "maxLength": 100 + }, + "adminArea3": { + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `adminArea2`. For example, in Brazil - Suburb, bairro, or neighborhood; in India - Sub-locality or district. Street name information may not always available and a sub-locality or district can reference a very small area.", + "type": "string", + "maxLength": 100 + }, + "adminArea2": { + "description": "A city, town, or village. Smaller than `adminArea1`.", + "type": "string", + "maxLength": 300 + }, + "adminArea1": { + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision; formatted for postal delivery. For example, `CA` and not `California`. For example, for UK - A county; for USs - A state; for Canada - A province; for Japan - A prefecture; for Switzerland - A kanton.", + "maxLength": 300 + }, + "postalCode": { + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries that have a postal code or an equivalent. See [Postal code](https://en.wikipedia.org/wiki/Postal_code).", + "maxLength": 60 + }, + "countryCode": { + "description": "The [two-character ISO 3166-1 code](https://en.wikipedia.org/wiki/ISO_3166-1) that identifies the country or region. Note: The country code for Great Britain is `GB` and not `UK` as used in the top-level domain names for that country. Use country code `C2` for China for comparable uncontrolled price (CUP) method, bank-card, and cross-border transactions.", + "$id": "https://godaddy.com/schemas/common-types/country-code.v1", + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "string", + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$" + }, + "addressDetails": { + "type": "object", + "title": "Address Details", + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third-party and open-source address libraries and redundant with core fields. For example, `address.addressLine1` is usually a combination of `addressDetails.streetNumber` and `streetName` and `streetType`.", + "properties": { + "streetNumber": { + "description": "The street number.", + "type": "string", + "maxLength": 100 + }, + "streetName": { + "description": "The street name. Just `Drury` in `Drury Lane`.", + "type": "string", + "maxLength": 100 + }, + "streetType": { + "description": "The street type. For example, avenue, boulevard, road, or expressway.", + "type": "string", + "maxLength": 100 + }, + "deliveryService": { + "description": "The delivery service. Post office box, bag number, or post office name.", + "type": "string", + "maxLength": 100 + }, + "buildingName": { + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House.", + "type": "string", + "maxLength": 100 + }, + "subBuilding": { + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment.", + "type": "string", + "maxLength": 100 + }, + "addressType": { + "description": "The type of address. Single character representation of a type. For example: 'B' for building, 'F' for organization, 'G' for general delivery, 'H' for high-rise, 'L' for large-volume organization, 'P' for Post Office box or delivery service, 'R' for rural route, 'S' for street, 'U' for unidentified address.", + "type": "string", + "maxLength": 1 + }, + "geoCoordinates": { + "description": "The latitude and longitude of the address. For example, `37.42242` and `-122.08585`.", + "$id": "https://godaddy.com/schema/common/geo-coordinates.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Geographic Coordinates", + "properties": { + "longitude": { + "type": "string", + "pattern": "^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\\.{1}\\d{1,6}" + }, + "latitude": { + "type": "string", + "pattern": "^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}" + } + }, + "required": [ + "longitude", + "latitude" + ] + } + } + } + }, + "required": [ + "countryCode" + ] + } + } + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "CARD": "../verification-data/CardVerificationData.yaml", + "TOKEN": "../verification-data/TokenVerificationData.yaml" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Discriminator type representing the type of verification data" + } + }, + "required": [ + "type" + ] + } + } + } + ], + "properties": { + "token": { + "type": "string", + "description": "Paze payment token", + "writeOnly": true, + "x-sensitivity": { + "classification": "restricted" + }, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + }, + "cardDetail": { + "description": "Card that was used with the Paze payment token", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Detail", + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "Card number" + }, + "numberHashed": { + "type": "string", + "description": "Card number hashed", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "VISA", + "MASTERCARD", + "AMERICAN_EXPRESS", + "DISCOVER", + "INTERAC", + "BANCOMAT", + "MAESTRO", + "DINERS_CLUB", + "JCB", + "UNIONPAY", + "BANKAXEPT", + "OTHER" + ], + "description": "Type of the card" + }, + "source": { + "type": "string", + "description": "Source of the card", + "enum": [ + "DIRECT", + "PAZE", + "APPLE_PAY", + "GOOGLE_PAY" + ] + }, + "track1data": { + "type": "string", + "writeOnly": true, + "description": "In some use-cases (like airlines) Track1 is required. Track1 contains some extra information over Track2 (like cardholder's name)." + }, + "track2data": { + "type": "string", + "writeOnly": true, + "description": "Required for swiped transactions. Track2 read from the card contains PAN, expiration, etc." + }, + "track3data": { + "type": "string", + "writeOnly": true, + "description": "Track3 for future use. Carries track from custom funding sources." + }, + "firstName": { + "type": "string", + "description": "First name of card holder" + }, + "lastName": { + "type": "string", + "description": "Last name of card holder" + }, + "expMonth": { + "type": "integer", + "minimum": 1, + "maximum": 12 + }, + "expYear": { + "type": "integer", + "minimum": 2000, + "maximum": 9999 + }, + "sequenceNumber": { + "type": "string", + "writeOnly": true, + "description": "Sequence number to distinguish between 2 cards with same PAN." + }, + "serviceCode": { + "type": "string", + "writeOnly": true, + "description": "Track data read from card" + }, + "encrypted": { + "type": "boolean", + "default": true, + "description": "True if the card number is encrypted", + "writeOnly": true + }, + "keySerialNumber": { + "type": "string", + "writeOnly": true, + "description": "For DUKPT encryption" + }, + "entryDetails": { + "description": "Card entry details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/card-entry-detail.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Entry Detail", + "type": "object", + "properties": { + "iccFallback": { + "type": "boolean", + "description": "indicates whether there was a fallback to MSR from EMV", + "default": false, + "writeOnly": true + }, + "entryMethod": { + "type": "string", + "description": "Entry mode for the card", + "enum": [ + "KEYED", + "MSR", + "CL_MSR", + "ICC", + "CL_ICC" + ] + }, + "customerPresent": { + "type": "boolean", + "description": "Indicates whether customer was present during transaction", + "default": false + } + } + }, + "interacMacDetail": { + "writeOnly": true, + "description": "Card Interacmac details", + "$id": "https://godaddy.com/schemas/commerce/transaction/funding-source/payment-card/interacmac.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interac Mac", + "type": "object", + "properties": { + "interacMac": { + "type": "string", + "description": "Interac mac details for canada based cards" + }, + "interacMacKSN": { + "type": "string", + "description": "Interac mac key serial number for canada based cards" + } + }, + "required": [ + "interacMac", + "interacMacKSN" + ] + }, + "emvTags": { + "writeOnly": true, + "description": "Card EMV tags", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "currency": { + "description": "Card's native currency code, when available.", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "legacyData": { + "deprecated": true, + "description": "Contains card details represented by legacy system", + "$id": "https://poynt.godaddy.com/schemas/funding-source/card-detail.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "$defs": { + "LegacyCardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "LegacyCardAgreementMetadata": { + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + }, + "description": "Object to represent card agreement metadata. Will hold the agreement template properties, language, country code etc." + }, + "LegacyCardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "LegacyCardKeyData": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + }, + "LegacyCardType": { + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + }, + "LegacyCardKey": { + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + } + }, + "properties": { + "cardAgreement": { + "type": "object", + "properties": { + "agreedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was agreed." + }, + "businessId": { + "type": "string", + "description": "Business UUID that this card agreement belongs to." + }, + "cardId": { + "type": "string", + "description": "Card UUID that this card agreement belongs to." + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "declinedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp for when this agreement was declined." + }, + "email": { + "type": "string", + "description": "The customer email that we will send the agreement to." + }, + "id": { + "type": "string", + "description": "UUID of the card agreement." + }, + "metadata": { + "description": "Card agreement metadata. Will hold the agreement template properties.", + "type": "object", + "properties": { + "businessContact": { + "type": "string", + "description": "Business contact or website.", + "maxLength": 1024 + }, + "businessName": { + "type": "string", + "description": "Business name.", + "maxLength": 128 + }, + "businessPhone": { + "type": "string", + "description": "Business phone.", + "maxLength": 16 + }, + "countryCode": { + "type": "string", + "description": "Customer country code in ISO 3166-1 alpha-2 format, that was used to resolve template.", + "maxLength": 2 + }, + "lang": { + "type": "string", + "description": "Language of agreement template in ISO 639-1 format, that was used to resolve template.", + "maxLength": 2 + } + } + }, + "status": { + "type": "string", + "description": "[Required] The type of card agreement status.", + "enum": [ + "ACCEPTED", + "DELETED", + "INACTIVE" + ] + }, + "txnId": { + "type": "string", + "description": "Transaction UUID where this agreement is accepted." + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "integer", + "description": "The version of agreement." + } + }, + "description": "Object to keep track of card agreements for referenced transactions and recurring billing." + }, + "status": { + "type": "string", + "description": "Status of the card.", + "enum": [ + "ACTIVE", + "REMOVED" + ] + }, + "cardBrand": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "displayName": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "id": { + "type": "string" + }, + "issuerBank": { + "type": "string", + "maxLength": 150 + }, + "logoUrl": { + "type": "string" + }, + "scheme": { + "type": "string" + } + }, + "description": "This object represents CardBrand." + }, + "cardHolderFullName": { + "type": "string", + "description": "Card holder's full name usually picked from track1.", + "maxLength": 256 + }, + "cardId": { + "type": "string", + "description": "The uuid of the card created" + }, + "encrypted": { + "type": "boolean", + "description": "True if track, PAN, expiration are encrypted." + }, + "encryptedExpirationDate": { + "type": "string", + "description": "If encryption is true, a single encrypted expiration date (containing year, month and possibly date) is provided here." + }, + "expirationDate": { + "type": "integer", + "description": "The date from expiration. Date is typically only present in EMV cards." + }, + "id": { + "type": "integer", + "description": "The id of the card created." + }, + "issuer": { + "type": "string" + }, + "key": { + "description": "List of keys and their versions being used. If encrypted is true, only one of key and keySerialNumber can be populated (not both).", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "description": "The key identifier.", + "type": "string", + "enum": [ + "WCK", + "WAEK", + "WMACK" + ] + }, + "version": { + "type": "string", + "description": "Version of the key.", + "maxLength": 4 + } + } + } + }, + "numberFirst6": { + "type": "string", + "description": "This is a response field. The first6 numbers of the PAN." + }, + "numberHashed": { + "type": "string" + }, + "numberLast4": { + "type": "string", + "description": "This is a response field. The last4 numbers of the PAN." + }, + "type": { + "description": "The network card belongs to: DISCOVER, VISA, MASTERCARD, AMEX, etc.", + "type": "string", + "enum": [ + "AMERICAN_EXPRESS", + "EBT", + "BANCOMAT", + "DISCOVER", + "MAESTRO", + "GOPAY", + "DINERS_CLUB", + "JCB", + "ALIPAY", + "MASTERCARD", + "DANKORT", + "OTHER", + "PAYPAL", + "INTERAC", + "UNIONPAY", + "VISA", + "BANKAXEPT" + ] + } + } + } + }, + "required": [ + "type", + "number", + "source" + ] + } + } + }, + { + "$id": "https://poynt.godaddy.com/schemas/funding-source/bank-account.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "Bank Account", + "$defs": { + "BankAccountType": { + "type": "string", + "enum": [ + "CHECKING", + "SAVINGS" + ] + }, + "BankAccountHolderType": { + "type": "string", + "enum": [ + "PERSONAL", + "BUSINESS" + ] + } + }, + "type": "object", + "properties": { + "accountNumber": { + "type": "string" + }, + "accountNumberLastFour": { + "type": "string" + }, + "accountType": { + "description": "Enum: CHECKING, SAVINGS.", + "type": "string", + "enum": [ + "CHECKING", + "SAVINGS" + ] + }, + "bankName": { + "type": "string" + }, + "country": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "ownerName": { + "type": "string", + "description": "The owner name of bank account." + }, + "routingNumber": { + "type": "string" + }, + "accountHolderType": { + "description": "Enum: PERSONAL, BUSINESS.", + "type": "string", + "enum": [ + "PERSONAL", + "BUSINESS" + ] + } + }, + "description": "This object represents BankAccount." + }, + { + "$id": "https://poynt.godaddy.com/schemas/funding-source/custom-funding-source.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "Custom Funding source", + "description": "Funding source that can be processed using a specific provider and / or processor", + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "Provider that can handle the funding source", + "maxLength": 64 + }, + "processor": { + "type": "string", + "description": "Processor to be used for the funding source", + "maxLength": 64 + }, + "customFundingType": { + "type": "string", + "description": "Type of the custom funding source", + "maxLength": 64 + }, + "name": { + "type": "string", + "description": "Display name of the funding source", + "maxLength": 64 + }, + "description": { + "type": "string", + "description": "Description about the funding source", + "maxLength": 512 + } + }, + "required": [ + "customFundingType", + "provider" + ] + }, + { + "$id": "https://poynt.godaddy.com/schemas/funding-source/cash.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "title": "Cash Funding Source", + "type": "object", + "properties": null, + "description": "Cash funding source" + } + ], + "discriminator": { + "propertyName": "sourceType", + "mapping": { + "PAYMENT_CARD": "./PaymentCard.yaml", + "EBT_CARD": "./EBTCard.yaml", + "GODADDY": "../payment-token/GoDaddyPaymentToken.yaml", + "APPLE_PAY": "../payment-token/ApplePayPaymentToken.yaml", + "GOOGLE_PAY": "../payment-token/GooglePayPaymentToken.yaml", + "PAZE": "../payment-token/PazePaymentToken.yaml", + "BANK_ACCOUNT": "./BankAccount.yaml", + "CUSTOM": "./CustomFundingSource.yaml", + "CASH": "./Cash.yaml" + } + }, + "properties": { + "sourceType": { + "type": "string", + "description": "Discriminator field representing the type of Funding source" + } + }, + "required": [ + "sourceType" + ] + }, + "status": { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Status", + "type": "string", + "enum": [ + "INITIATED", + "PENDING", + "FAILED", + "COMPLETED", + "VOIDED" + ], + "description": "Transaction status" + }, + "amount": { + "description": "Transaction amount", + "$id": "https://godaddy.com/schemas/commerce/transaction/amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "description": "Simple amount used for processing transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Transaction amount" + }, + "currency": { + "description": "Transaction currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/detailed-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "description": "Itemized amount details used for processing transaction", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/transaction/tip-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "format": "int64", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "description": "Fee associated with transaction", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Fee", + "type": "object", + "description": "Simple fee associated with transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/governed-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Governed Fee", + "description": "Governed fee associated with transaction", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "programType": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "type": { + "type": "string", + "example": "FIXED", + "description": "How the fee should be appliedbinary", + "enum": [ + "FIXED", + "HYBRID", + "PERCENTAGE" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + } + }, + "required": [ + "amount", + "programType", + "type" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + }, + "required": [ + "amountType" + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "voidableUntil": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Time in RFC 3339 format by which this transaction can be voided.", + "example": "2022-07-21T17:32:28Z" + }, + "context": { + "description": "Transaction context", + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction-context.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Context", + "type": "object", + "properties": { + "channelId": { + "$id": "https://godaddy.com/schemas/commerce/transaction/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + }, + "merchantInitiatedTransaction": { + "type": "boolean", + "default": false, + "description": "True if initiated by the Merchant on behalf of the customer" + } + } + }, + "clientContext": { + "description": "non-sensitive context data that can be stored and fetched by client when needed", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorResponse": { + "readOnly": true, + "description": "Processor response", + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Processor Response", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/creditcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "description": "Processor response for credit card", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/processor-response/cv-verification-result.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "description": "CVV verification result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/cv-result-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CVV Verification result status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ] + }, + "approvalCode": { + "type": "string", + "description": "The approval code that came back from the acquirer (usually its 6 alpha-numeric characters).", + "maxLength": 32 + }, + "approvedAmount": { + "type": "integer", + "format": "int64", + "description": "The amount that the authorization was approved for. This could be different from the transactionAmount requested." + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure." + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/debitcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Debit Card Processor Response", + "description": "Processor response for debit card", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/creditcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "description": "Processor response for credit card", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/processor-response/cv-verification-result.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "description": "CVV verification result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/cv-result-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CVV Verification result status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ] + }, + "approvalCode": { + "type": "string", + "description": "The approval code that came back from the acquirer (usually its 6 alpha-numeric characters).", + "maxLength": 32 + }, + "approvedAmount": { + "type": "integer", + "format": "int64", + "description": "The amount that the authorization was approved for. This could be different from the transactionAmount requested." + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure." + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "format": "int64", + "description": "Remaining balance amount" + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string", + "description": "Discriminator field representing the type of processor response" + } + }, + "required": [ + "processorType" + ] + }, + "processingInstructions": { + "description": "Processing instructions to be used while processing transaction", + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction-processing-instruction.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Processing Instruction", + "type": "object", + "properties": { + "authOnly": { + "type": "boolean", + "default": false, + "writeOnly": true, + "description": "Perform authorize only and do not auto capture. Applicable only for AUTHORIZATION type payment" + }, + "partialAuthEnabled": { + "type": "boolean", + "default": true, + "writeOnly": true, + "description": "Allow partial authorizations. Applicable only for AUTHORIZATION and SALE type payment" + }, + "statementDescriptorSuffix": { + "type": "string", + "writeOnly": true, + "description": "Transaction-level statement descriptor suffix. It's optional field. If parent transaction has data it will be used from parent transaction. If not provided then statement descriptor suffix from device/store/business level will be used." + }, + "storeAndForward": { + "type": "boolean", + "default": false, + "description": "Store and forward transaction. Used to identify if the transaction is online or offline" + } + } + }, + "notes": { + "type": "string", + "maxLength": 512, + "description": "Notes about transaction" + }, + "legacyMetadata": { + "description": "Transaction metadata represented by legacy system", + "deprecated": true, + "$id": "https://poynt.godaddy.com/schemas/transaction/metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "$defs": { + "LegacyAdjustmentRecord": { + "type": "object", + "properties": { + "amountChanges": { + "description": "Total amount change in this adjustment.", + "$id": "https://godaddy.com/schemas/commerce/transaction/amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "description": "Simple amount used for processing transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Transaction amount" + }, + "currency": { + "description": "Transaction currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/detailed-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "description": "Itemized amount details used for processing transaction", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/transaction/tip-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "format": "int64", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "description": "Fee associated with transaction", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Fee", + "type": "object", + "description": "Simple fee associated with transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/governed-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Governed Fee", + "description": "Governed fee associated with transaction", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "programType": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "type": { + "type": "string", + "example": "FIXED", + "description": "How the fee should be appliedbinary", + "enum": [ + "FIXED", + "HYBRID", + "PERCENTAGE" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + } + }, + "required": [ + "amount", + "programType", + "type" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + }, + "required": [ + "amountType" + ] + }, + "amounts": { + "description": "Total amount after this adjustment.", + "$id": "https://godaddy.com/schemas/commerce/transaction/amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "description": "Simple amount used for processing transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Transaction amount" + }, + "currency": { + "description": "Transaction currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/detailed-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "description": "Itemized amount details used for processing transaction", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/transaction/tip-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "format": "int64", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "description": "Fee associated with transaction", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Fee", + "type": "object", + "description": "Simple fee associated with transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/governed-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Governed Fee", + "description": "Governed fee associated with transaction", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "programType": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "type": { + "type": "string", + "example": "FIXED", + "description": "How the fee should be appliedbinary", + "enum": [ + "FIXED", + "HYBRID", + "PERCENTAGE" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + } + }, + "required": [ + "amount", + "programType", + "type" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + }, + "required": [ + "amountType" + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "This is a response field. The server time (in ISO-8601 format) at which this transaction was initially created. E.g. 2014-09-11T23:14:44Z." + }, + "exchangeRate": { + "type": "object", + "properties": { + "businessId": { + "type": "string" + }, + "cardAmount": { + "type": "integer", + "format": "int64" + }, + "cardCurrency": { + "type": "string", + "minLength": 3, + "maxLength": 3 + }, + "cardTipAmount": { + "type": "integer", + "format": "int64" + }, + "disclaimer": { + "type": "string" + }, + "markupInfo1": { + "type": "string" + }, + "markupInfo2": { + "type": "string" + }, + "markupPercentage": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "rate": { + "type": "integer", + "format": "int64" + }, + "ratePrecision": { + "type": "integer", + "format": "int64" + }, + "requestedAt": { + "type": "string", + "format": "date-time" + }, + "signature": { + "type": "string" + }, + "tipAmount": { + "type": "integer", + "format": "int64" + }, + "txnAmount": { + "type": "integer", + "format": "int64" + }, + "txnCurrency": { + "type": "string", + "minLength": 3, + "maxLength": 3 + } + }, + "description": "Exchange rate used for this adjustment." + }, + "processorResponse": { + "description": "This object includes some important response elements received from the processor.", + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Processor Response", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/creditcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "description": "Processor response for credit card", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/processor-response/cv-verification-result.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "description": "CVV verification result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/cv-result-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CVV Verification result status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ] + }, + "approvalCode": { + "type": "string", + "description": "The approval code that came back from the acquirer (usually its 6 alpha-numeric characters).", + "maxLength": 32 + }, + "approvedAmount": { + "type": "integer", + "format": "int64", + "description": "The amount that the authorization was approved for. This could be different from the transactionAmount requested." + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure." + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/debitcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Debit Card Processor Response", + "description": "Processor response for debit card", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/creditcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "description": "Processor response for credit card", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/processor-response/cv-verification-result.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "description": "CVV verification result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/cv-result-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CVV Verification result status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ] + }, + "approvalCode": { + "type": "string", + "description": "The approval code that came back from the acquirer (usually its 6 alpha-numeric characters).", + "maxLength": 32 + }, + "approvedAmount": { + "type": "integer", + "format": "int64", + "description": "The amount that the authorization was approved for. This could be different from the transactionAmount requested." + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure." + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "format": "int64", + "description": "Remaining balance amount" + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string", + "description": "Discriminator field representing the type of processor response" + } + }, + "required": [ + "processorType" + ] + }, + "reason": { + "type": "object", + "description": "Reason for this adjustment.", + "properties": { + "program": { + "type": "string", + "enum": [ + "NO_SHOW", + "PURCHASE", + "CARD_DEPOSIT", + "DELAYED_CHARGE", + "EXPRESS_SERVICE", + "ASSURED_RESERVATION" + ], + "description": "The reason for the transaction - currently only applicable for lodging." + }, + "programFor": { + "description": "Some programs require this additional programFor list to be populated.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "RESTAURANT", + "GIFT_SHOP", + "MINI_BAR", + "TELEPHONE", + "LAUNDRY", + "OTHER" + ] + } + } + } + }, + "sequence": { + "type": "integer", + "description": "This field indicates the sequence in which this AdjustmentRecord happened in the adjustment history." + }, + "signature": { + "format": "byte", + "type": "string" + }, + "signatureCaptured": { + "type": "boolean", + "description": "Shows whether signature was captured for this adjustment." + }, + "systemTraceAuditNumber": { + "type": "string" + }, + "transactionNumber": { + "type": "string" + } + }, + "description": "This object shows a summary of the adjustment." + }, + "LegacyPoyntLoyalty": { + "type": "object", + "properties": { + "externalId": { + "type": "string" + }, + "loyalty": { + "type": "array", + "items": { + "type": "object", + "properties": { + "businessLoyaltyId": { + "type": "integer", + "format": "int64" + }, + "campaignDescription": { + "type": "string" + }, + "campaignName": { + "type": "string" + }, + "lastIncrement": { + "type": "integer", + "format": "int64" + }, + "loyaltyType": { + "type": "string" + }, + "loyaltyUnit": { + "type": "string" + }, + "nextTier": { + "type": "string" + }, + "points": { + "type": "integer", + "format": "int64" + }, + "pointsRequired": { + "type": "integer", + "format": "int64" + }, + "rewardDescription": { + "type": "string" + }, + "tier": { + "type": "string" + }, + "totalPoints": { + "type": "integer", + "format": "int64" + }, + "totalSpend": { + "type": "integer", + "format": "int64" + }, + "totalVisits": { + "type": "integer", + "format": "int64" + } + } + } + }, + "loyaltyId": { + "type": "integer", + "format": "int64" + }, + "reward": { + "type": "array", + "items": { + "type": "object", + "properties": { + "businessLoyaltyId": { + "type": "integer", + "format": "int64" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "newReward": { + "type": "boolean" + }, + "postText": { + "type": "string" + }, + "preText": { + "type": "string" + }, + "rewardDescription": { + "type": "string" + }, + "rewardId": { + "type": "integer", + "format": "int64" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "integer", + "format": "int64" + } + } + } + } + } + }, + "LegacyPoyntLoyaltyCampaign": { + "type": "object", + "properties": { + "businessLoyaltyId": { + "type": "integer", + "format": "int64" + }, + "campaignDescription": { + "type": "string" + }, + "campaignName": { + "type": "string" + }, + "lastIncrement": { + "type": "integer", + "format": "int64" + }, + "loyaltyType": { + "type": "string" + }, + "loyaltyUnit": { + "type": "string" + }, + "nextTier": { + "type": "string" + }, + "points": { + "type": "integer", + "format": "int64" + }, + "pointsRequired": { + "type": "integer", + "format": "int64" + }, + "rewardDescription": { + "type": "string" + }, + "tier": { + "type": "string" + }, + "totalPoints": { + "type": "integer", + "format": "int64" + }, + "totalSpend": { + "type": "integer", + "format": "int64" + }, + "totalVisits": { + "type": "integer", + "format": "int64" + } + } + }, + "LegacyPoyntLoyaltyReward": { + "type": "object", + "properties": { + "businessLoyaltyId": { + "type": "integer", + "format": "int64" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "newReward": { + "type": "boolean" + }, + "postText": { + "type": "string" + }, + "preText": { + "type": "string" + }, + "rewardDescription": { + "type": "string" + }, + "rewardId": { + "type": "integer", + "format": "int64" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "integer", + "format": "int64" + } + } + } + }, + "properties": { + "actionVoid": { + "type": "boolean" + }, + "adjusted": { + "type": "boolean", + "description": "This is a response only field. This flag will be present on the transaction that was adjusted and its parents. Most processors only allow adjustment on an Authorize transaction, but some do allow adjustment on Sale or Capture too." + }, + "adjustmentHistory": { + "description": "If the transaction has been adjusted (aka updated), this list will show the details of the updates.", + "type": "array", + "items": { + "type": "object", + "properties": { + "amountChanges": { + "description": "Total amount change in this adjustment.", + "$id": "https://godaddy.com/schemas/commerce/transaction/amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "description": "Simple amount used for processing transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Transaction amount" + }, + "currency": { + "description": "Transaction currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/detailed-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "description": "Itemized amount details used for processing transaction", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/transaction/tip-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "format": "int64", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "description": "Fee associated with transaction", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Fee", + "type": "object", + "description": "Simple fee associated with transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/governed-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Governed Fee", + "description": "Governed fee associated with transaction", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "programType": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "type": { + "type": "string", + "example": "FIXED", + "description": "How the fee should be appliedbinary", + "enum": [ + "FIXED", + "HYBRID", + "PERCENTAGE" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + } + }, + "required": [ + "amount", + "programType", + "type" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + }, + "required": [ + "amountType" + ] + }, + "amounts": { + "description": "Total amount after this adjustment.", + "$id": "https://godaddy.com/schemas/commerce/transaction/amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Amount", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Amount", + "type": "object", + "description": "Simple amount used for processing transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Transaction amount" + }, + "currency": { + "description": "Transaction currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + } + }, + "required": [ + "amount", + "currency" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/detailed-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Detailed Amount", + "type": "object", + "description": "Itemized amount details used for processing transaction", + "properties": { + "total": { + "type": "integer", + "format": "int64", + "description": "Total amount" + }, + "tip": { + "nullable": true, + "description": "Tip amount details", + "$id": "https://godaddy.com/schemas/commerce/transaction/tip-amount.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Tip Amount", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Tip amount" + }, + "customerOptedNoTip": { + "type": "boolean", + "default": false, + "description": "Customer opted for no tip" + } + } + }, + "cashback": { + "type": "integer", + "format": "int64", + "description": "Cashback details" + }, + "subTotal": { + "type": "integer", + "format": "int64", + "description": "Sub total details" + }, + "currency": { + "description": "Amount currency", + "$id": "https://godaddy.com/schemas/commerce/transaction/currency.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Currency", + "type": "string", + "example": "USD", + "minLength": 3, + "maxLength": 3, + "x-custom-type": true, + "x-currency-type": true + }, + "fees": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Fee", + "description": "Fee associated with transaction", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/simple-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Simple Fee", + "type": "object", + "description": "Simple fee associated with transaction", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "type": { + "type": "string", + "example": "Shipping", + "description": "Fee type", + "minLength": 2, + "maxLength": 64 + } + }, + "required": [ + "amount", + "type" + ] + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/governed-fee.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Governed Fee", + "description": "Governed fee associated with transaction", + "type": "object", + "properties": { + "amount": { + "type": "integer", + "format": "int64", + "description": "Fee amount" + }, + "programType": { + "type": "string", + "example": "SURCHARGE", + "description": "Fee Program type", + "enum": [ + "SURCHARGE", + "SERVICE_FEE", + "CONVENIENCE_FEE", + "CASH_DISCOUNT" + ] + }, + "type": { + "type": "string", + "example": "FIXED", + "description": "How the fee should be appliedbinary", + "enum": [ + "FIXED", + "HYBRID", + "PERCENTAGE" + ] + }, + "signature": { + "type": "string", + "maxLength": 256, + "description": "Signature representing the Fee", + "writeOnly": true, + "x-propagation": { + "optional": true + }, + "x-field-extra-annotation": "@com.fasterxml.jackson.annotation.JsonIgnore" + } + }, + "required": [ + "amount", + "programType", + "type" + ] + } + ], + "discriminator": { + "propertyName": "feeType", + "mapping": { + "ADDITIONAL": "./SimpleFee.yaml", + "GOVERNED": "./GovernedFee.yaml" + } + }, + "properties": { + "feeType": { + "type": "string", + "description": "Fee type discriminator" + } + }, + "required": [ + "feeType" + ] + }, + "description": "Fees if any" + } + }, + "required": [ + "total", + "currency" + ] + } + ], + "discriminator": { + "propertyName": "amountType", + "mapping": { + "DETAILED": "./DetailedAmount.yaml", + "SIMPLE": "./SimpleAmount.yaml" + } + }, + "properties": { + "amountType": { + "type": "string" + } + }, + "required": [ + "amountType" + ] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "This is a response field. The server time (in ISO-8601 format) at which this transaction was initially created. E.g. 2014-09-11T23:14:44Z." + }, + "exchangeRate": { + "type": "object", + "properties": { + "businessId": { + "type": "string" + }, + "cardAmount": { + "type": "integer", + "format": "int64" + }, + "cardCurrency": { + "type": "string", + "minLength": 3, + "maxLength": 3 + }, + "cardTipAmount": { + "type": "integer", + "format": "int64" + }, + "disclaimer": { + "type": "string" + }, + "markupInfo1": { + "type": "string" + }, + "markupInfo2": { + "type": "string" + }, + "markupPercentage": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "rate": { + "type": "integer", + "format": "int64" + }, + "ratePrecision": { + "type": "integer", + "format": "int64" + }, + "requestedAt": { + "type": "string", + "format": "date-time" + }, + "signature": { + "type": "string" + }, + "tipAmount": { + "type": "integer", + "format": "int64" + }, + "txnAmount": { + "type": "integer", + "format": "int64" + }, + "txnCurrency": { + "type": "string", + "minLength": 3, + "maxLength": 3 + } + }, + "description": "Exchange rate used for this adjustment." + }, + "processorResponse": { + "description": "This object includes some important response elements received from the processor.", + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Processor Response", + "type": "object", + "oneOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/creditcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "description": "Processor response for credit card", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/processor-response/cv-verification-result.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "description": "CVV verification result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/cv-result-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CVV Verification result status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ] + }, + "approvalCode": { + "type": "string", + "description": "The approval code that came back from the acquirer (usually its 6 alpha-numeric characters).", + "maxLength": 32 + }, + "approvedAmount": { + "type": "integer", + "format": "int64", + "description": "The amount that the authorization was approved for. This could be different from the transactionAmount requested." + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure." + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + }, + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/debitcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Debit Card Processor Response", + "description": "Processor response for debit card", + "type": "object", + "allOf": [ + { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/processor-response/creditcard.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Card Processor Response", + "description": "Processor response for credit card", + "type": "object", + "properties": { + "avsResult": { + "description": "Address verifications result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/processor-response/cv-verification-result.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Results", + "type": "object", + "properties": { + "addressResult": { + "readOnly": true, + "description": "Result of Address verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cityResult": { + "readOnly": true, + "description": "Result of City verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "postalCodeResult": { + "readOnly": true, + "description": "Result of Postal code verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "stateResult": { + "readOnly": true, + "description": "Result of State verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "countryResult": { + "readOnly": true, + "description": "Result of Country verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "phoneResult": { + "readOnly": true, + "description": "Result of Phone verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + }, + "cardHolderNameResult": { + "readOnly": true, + "description": "Result of Card holder name verification", + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/address-verification-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Address Verification Status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "UNAVAILABLE" + ] + } + } + }, + "cvResult": { + "description": "CVV verification result", + "readOnly": true, + "$id": "https://godaddy.com/schemas/commerce/transaction/payment-card/cv-result-status.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CVV Verification result status", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "UNAVAILABLE" + ] + }, + "approvalCode": { + "type": "string", + "description": "The approval code that came back from the acquirer (usually its 6 alpha-numeric characters).", + "maxLength": 32 + }, + "approvedAmount": { + "type": "integer", + "format": "int64", + "description": "The amount that the authorization was approved for. This could be different from the transactionAmount requested." + }, + "scaResult": { + "type": "string", + "readOnly": true, + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure." + }, + "interacMacResult": { + "type": "string", + "readOnly": true, + "description": "Interac mac result (if interacMac is used)" + }, + "emvTags": { + "readOnly": true, + "description": "EMV tags obtained from the processor", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + } + ], + "properties": { + "remainingBalanceAmount": { + "type": "integer", + "format": "int64", + "description": "Remaining balance amount" + }, + "legacyProcessorData": { + "deprecated": true, + "description": "Process response data used by legacy system", + "$id": "https://poynt.godaddy.com/schemas/transaction/processor-response-metadata.v2", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "x-legacy": true, + "$defs": { + "LegacyAVSResult": { + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "LegacyAVSResultType": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "LegacyCVResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "LegacyECheckProcessor": { + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "LegacyProcessorStatus": { + "type": "string", + "enum": [ + "Successful", + "Failure" + ] + }, + "LegacyProviderVerification": { + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + }, + "description": "Provider verification fields." + }, + "LegacyStrongCustomerAuthenticationResult": { + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + } + }, + "type": "object", + "properties": { + "acquirer": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "adapterId": { + "type": "string" + }, + "adapterVariant": { + "type": "string" + }, + "avsResult": { + "description": "The address verification results.", + "x-legacy": true, + "type": "object", + "properties": { + "actualResult": { + "type": "string" + }, + "addressResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cardHolderNameResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "cityResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "countryResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "phoneResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "postalCodeResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + }, + "stateResult": { + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "PARTIAL_MATCH", + "NOT_PROVIDED", + "ISSUER_NOT_CERTIFIED", + "NO_RESPONSE_FROM_CARD_ASSOCIATION", + "UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION", + "NOT_VERIFIED", + "BAD_FORMAT", + "ERROR", + "UNSUPPORTED_BY_ISSUER", + "UNAVAILABLE", + "ADDRESS_AND_ZIP_MATCH" + ] + } + } + }, + "batchAutoClosedByHost": { + "type": "string" + }, + "batchId": { + "type": "string", + "description": "The ID of the settlement batch that this transaction is assigned to.", + "maxLength": 64 + }, + "cardToken": { + "type": "string", + "maxLength": 256 + }, + "cvActualResult": { + "type": "string" + }, + "cvResult": { + "description": "The card verification results.", + "type": "string", + "enum": [ + "MATCH", + "NO_MATCH", + "NOT_PROCESSED", + "NO_CODE_PRESENT", + "SHOULD_HAVE_BEEN_PRESENT", + "ISSUER_NOT_CERTIFIED", + "INVALID", + "NO_RESPONSE", + "NOT_APPLICABLE" + ] + }, + "debitResponseCode": { + "type": "string" + }, + "echeckProcessor": { + "description": "eCheck(electronic payment funded by the buyer's bank account) processor used by the business.", + "type": "string", + "enum": [ + "MOCK", + "CHECK_COMMERCE" + ] + }, + "issuerResponseCode": { + "type": "string" + }, + "pinSessionKey": { + "type": "string" + }, + "processedAt": { + "type": "string", + "format": "date-time", + "description": "Date / time of transaction received by the processor host." + }, + "processor": { + "type": "string", + "enum": [ + "CHASE_PAYMENTECH", + "REDE", + "EVO", + "FIRST_DATA", + "GLOBAL_PAYMENTS", + "HEARTLAND_PAYMENT_SYSTEM", + "ELAVON", + "MERCURY", + "MONERIS", + "PAYPAL", + "ELAVON_MX", + "STRIPE", + "TSYS", + "VANTIV", + "WORLDPAY", + "EPX", + "WEPAY", + "MASHREQ", + "AXIS", + "KARTUKU", + "NEXI", + "DANA", + "MYNT", + "POYNT", + "NUVEI", + "NPAY", + "BRIDGEPAY", + "CONVERGE", + "MOCK", + "NA_BANCARD", + "CREDITCALL", + "ELAVON_EU", + "FUSEBOX", + "EVERTEC", + "GHL", + "RS2", + "JCN", + "PRISMA", + "VANTIV_EXPRESS", + "EZETAP", + "ADYEN", + "USBANK", + "LETGO", + "CHECK_COMMERCE" + ] + }, + "providerVerification": { + "description": "Object that carries provider verification related fields.", + "type": "object", + "properties": { + "publicKeyHash": { + "type": "string", + "description": "A hash of the public key so Poynt knows it has the right public key." + }, + "signature": { + "type": "string", + "description": "Base64 encoded signature of the transactions." + } + } + }, + "ps2000Data": { + "type": "string", + "description": "Payment Service 2000 data to process a secondary transaction" + }, + "retrievalRefNum": { + "type": "string", + "maxLength": 64 + }, + "scaResult": { + "description": "Represents a SCA status if it was triggered. Strong Customer Authentication (SCA) is a European regulatory requirement to reduce fraud and make online payments more secure.", + "type": "string", + "enum": [ + "ENTER_PIN", + "INSERT_CARD", + "CDCVM" + ] + }, + "status": { + "description": "Possible values are Successful or Failure.", + "enum": [ + "Successful", + "Failure" + ], + "type": "string" + }, + "statusCode": { + "type": "string", + "description": "Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer.", + "maxLength": 64 + }, + "statusMessage": { + "type": "string", + "description": "Will be whatever message came back from the acquirer.", + "maxLength": 512 + }, + "transactionId": { + "type": "string", + "description": "The transactionID that came back from the acquirer.", + "maxLength": 64 + } + } + } + } + } + ], + "discriminator": { + "propertyName": "processorType", + "mapping": { + "CREDIT_CARD": "./CreditCardProcessorResponse.yaml", + "DEBIT_CARD": "./DebitCardProcessorResponse.yaml" + } + }, + "properties": { + "processorType": { + "type": "string", + "description": "Discriminator field representing the type of processor response" + } + }, + "required": [ + "processorType" + ] + }, + "reason": { + "type": "object", + "description": "Reason for this adjustment.", + "properties": { + "program": { + "type": "string", + "enum": [ + "NO_SHOW", + "PURCHASE", + "CARD_DEPOSIT", + "DELAYED_CHARGE", + "EXPRESS_SERVICE", + "ASSURED_RESERVATION" + ], + "description": "The reason for the transaction - currently only applicable for lodging." + }, + "programFor": { + "description": "Some programs require this additional programFor list to be populated.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "RESTAURANT", + "GIFT_SHOP", + "MINI_BAR", + "TELEPHONE", + "LAUNDRY", + "OTHER" + ] + } + } + } + }, + "sequence": { + "type": "integer", + "description": "This field indicates the sequence in which this AdjustmentRecord happened in the adjustment history." + }, + "signature": { + "format": "byte", + "type": "string" + }, + "signatureCaptured": { + "type": "boolean", + "description": "Shows whether signature was captured for this adjustment." + }, + "systemTraceAuditNumber": { + "type": "string" + }, + "transactionNumber": { + "type": "string" + } + }, + "description": "This object shows a summary of the adjustment." + } + }, + "amountsAdjusted": { + "type": "boolean" + }, + "approvalCode": { + "type": "string", + "description": "An approval code received over the phone (in case of terminal going offline) can be passed here as part of a SALE transaction. This process in the industry is often referred to as forced post or forced sale.", + "maxLength": 32 + }, + "authOnly": { + "type": "boolean", + "description": "This is an in/out field. If not passed, it will default to false. This tells the terminal to only authorize and wait for the merchant to capture it." + }, + "chargebackStatus": { + "type": "string", + "enum": [ + "CREATED", + "DISPUTED", + "MERCHANT_WON", + "MERCHANT_LOST" + ] + }, + "context": { + "description": "[Required] Contains context about the transaction. TransmissionAtLocal must be provided. All other fields are optional.", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "customerLanguage": { + "type": "string", + "description": "The customer's language preference for the transaction.", + "minLength": 2, + "maxLength": 2 + }, + "customerUserId": { + "type": "integer", + "format": "int64", + "description": "A Poynt generated customer id that is returned in the response. This id is only assigned only to a customer performing a card transaction." + }, + "emailReceipt": { + "type": "boolean" + }, + "intent": { + "type": "string", + "description": "This field is used to inform the transaction intent. Client must use this field wherever applicable for better approval rate.", + "enum": [ + "UNSCHEDULED_COF_TXN", + "RECURRING_COF_TXN", + "INSTALLMENT_COF_TXN" + ] + }, + "partialAuthEnabled": { + "type": "boolean" + }, + "partiallyApproved": { + "type": "boolean" + }, + "paymentTokenUsed": { + "type": "boolean", + "description": "This means that transaction was processed with payment token." + }, + "pinCaptured": { + "type": "boolean" + }, + "poyntLoyalty": { + "type": "object", + "properties": { + "externalId": { + "type": "string" + }, + "loyalty": { + "type": "array", + "items": { + "type": "object", + "properties": { + "businessLoyaltyId": { + "type": "integer", + "format": "int64" + }, + "campaignDescription": { + "type": "string" + }, + "campaignName": { + "type": "string" + }, + "lastIncrement": { + "type": "integer", + "format": "int64" + }, + "loyaltyType": { + "type": "string" + }, + "loyaltyUnit": { + "type": "string" + }, + "nextTier": { + "type": "string" + }, + "points": { + "type": "integer", + "format": "int64" + }, + "pointsRequired": { + "type": "integer", + "format": "int64" + }, + "rewardDescription": { + "type": "string" + }, + "tier": { + "type": "string" + }, + "totalPoints": { + "type": "integer", + "format": "int64" + }, + "totalSpend": { + "type": "integer", + "format": "int64" + }, + "totalVisits": { + "type": "integer", + "format": "int64" + } + } + } + }, + "loyaltyId": { + "type": "integer", + "format": "int64" + }, + "reward": { + "type": "array", + "items": { + "type": "object", + "properties": { + "businessLoyaltyId": { + "type": "integer", + "format": "int64" + }, + "expireAt": { + "type": "string", + "format": "date-time" + }, + "newReward": { + "type": "boolean" + }, + "postText": { + "type": "string" + }, + "preText": { + "type": "string" + }, + "rewardDescription": { + "type": "string" + }, + "rewardId": { + "type": "integer", + "format": "int64" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + }, + "value": { + "type": "integer", + "format": "int64" + } + } + } + } + } + }, + "processorOptions": { + "description": "A name/value pair list that could be persisted and later retreived - primarily to store additional payment related data that get passed through to the processor.", + "$id": "https://godaddy.com/schemas/commerce/transaction/dictionary.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Dictionary", + "type": "object", + "minProperties": 0, + "maxProperties": 40, + "additionalProperties": { + "type": "string", + "maxLength": 256 + } + }, + "processorTransactionId": { + "type": "string", + "description": "The capability to enter a transaction id along with approval code.", + "maxLength": 64 + }, + "reason": { + "type": "object", + "properties": { + "program": { + "type": "string", + "enum": [ + "NO_SHOW", + "PURCHASE", + "CARD_DEPOSIT", + "DELAYED_CHARGE", + "EXPRESS_SERVICE", + "ASSURED_RESERVATION" + ], + "description": "The reason for the transaction - currently only applicable for lodging." + }, + "programFor": { + "description": "Some programs require this additional programFor list to be populated.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "RESTAURANT", + "GIFT_SHOP", + "MINI_BAR", + "TELEPHONE", + "LAUNDRY", + "OTHER" + ] + } + } + }, + "description": "Reason for transaction - currently only applicable for lodging." + }, + "receiptEmailAddress": { + "type": "string", + "description": "Email address collected from the customer.", + "maxLength": 512 + }, + "receiptPhone": { + "type": "object", + "properties": { + "areaCode": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "extensionNumber": { + "type": "string" + }, + "id": { + "type": "integer", + "format": "int64" + }, + "ituCountryCode": { + "type": "string" + }, + "localPhoneNumber": { + "type": "string" + }, + "primaryDayTime": { + "type": "boolean" + }, + "primaryEvening": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "ADDED", + "CONFIRMED" + ] + }, + "type": { + "type": "string", + "enum": [ + "HOME", + "WORK", + "BUSINESS", + "MOBILE", + "FAX", + "PAGER", + "RECEIPT", + "OTHER" + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + }, + "description": "Phone collected from the customer to SMS receipt." + }, + "references": { + "description": "References to orders/invoices that this transaction is for.", + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction-reference.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Reference", + "type": "object", + "description": "Reference to a document (e.g. order or invoice) that this transaction is for", + "properties": { + "value": { + "type": "string", + "maxLength": 128 + }, + "type": { + "type": "string", + "maxLength": 32 + }, + "additionalLabel": { + "description": "(Optional) Label that the reference points to", + "type": "string", + "maxLength": 32 + } + }, + "required": [ + "value", + "type" + ] + } + }, + "reversalVoid": { + "type": "boolean" + }, + "saveCardOnFile": { + "type": "boolean", + "description": "This boolean field is used to inform if user wants to save card on file with this transaction. Client must use this field wherever applicable for better approval rate." + }, + "settled": { + "type": "boolean" + }, + "settlementStatus": { + "type": "string", + "description": "Represents settlement status of transaction.", + "maxLength": 32 + }, + "shippingAddress": { + "type": "object", + "properties": { + "city": { + "type": "string", + "maxLength": 64 + }, + "countryCode": { + "type": "string", + "maxLength": 3 + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The time (in ISO-8601 format) at which the address was created. E.g. 2014-09-11T23:14:44Z." + }, + "id": { + "type": "integer", + "format": "int64" + }, + "line1": { + "type": "string", + "maxLength": 128 + }, + "line2": { + "type": "string", + "maxLength": 128 + }, + "postalCode": { + "type": "string", + "maxLength": 16 + }, + "postalCodeExtension": { + "type": "string", + "maxLength": 16 + }, + "primary": { + "type": "boolean" + }, + "status": { + "type": "string", + "const": "ADDED" + }, + "territory": { + "type": "string", + "maxLength": 64 + }, + "territoryType": { + "type": "string", + "enum": [ + "STATE", + "PROVINCE", + "OTHER" + ], + "description": "TerritoryType enum and territory go hand in hand. This enum specifies what kind of territory is in the territory field. E.g. in the US, this will typically be STATE." + }, + "type": { + "type": "string", + "enum": [ + "HOME", + "WORK", + "BUSINESS", + "TRANSACTION", + "OTHER" + ] + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "description": "The time (in ISO-8601 format) at which the address was updated. E.g. 2014-09-11T23:14:44Z." + } + }, + "description": "A shipping address associated with the transaction." + }, + "signature": { + "description": "Signature collected from the customer.", + "format": "byte", + "type": "string" + }, + "signatureCaptured": { + "type": "boolean", + "description": "This is a response field. This field could be used by the client to inform that signature has or will soon be captured. The server uses this field to inform whether a signature has been captured." + }, + "signatureRequired": { + "type": "boolean" + }, + "status": { + "type": "string", + "enum": [ + "CREATED", + "SAVED", + "AUTHORIZED", + "PENDING", + "PARTIALLY_CAPTURED", + "CAPTURED", + "DECLINED", + "PARTIALLY_CAPTURED_AND_PARTIALLY_REFUNDED", + "PARTIALLY_REFUNDED", + "REFUNDED", + "VOIDED", + "STEP_UP" + ], + "description": "If funding source is CASH, only CAPTURED and REFUNDED are the possible options. The SAVE feature is not applicable to CASH." + }, + "stayType": { + "type": "string", + "enum": [ + "GENERAL_CONTAINER", + "REGULAR_STAY", + "QUICK_STAY", + "NON_LODGING_SALE", + "NON_LODGING_NRR" + ] + }, + "systemTraceAuditNumber": { + "type": "string", + "description": "This is a unique number per transaction session generated by the terminal.", + "minLength": 1, + "maxLength": 6 + }, + "voided": { + "type": "boolean" + } + } + }, + "references": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction-reference.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Reference", + "type": "object", + "description": "Reference to a document (e.g. order or invoice) that this transaction is for", + "properties": { + "value": { + "type": "string", + "maxLength": 128 + }, + "type": { + "type": "string", + "maxLength": 32 + }, + "additionalLabel": { + "description": "(Optional) Label that the reference points to", + "type": "string", + "maxLength": 32 + } + }, + "required": [ + "value", + "type" + ] + }, + "description": "References to the transaction" + }, + "links": { + "type": "array", + "items": { + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target.", + "type": "string", + "format": "uri" + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "rel", + "href" + ] + }, + "description": "Links associated with this transaction" + } + }, + "required": [ + "type", + "amount", + "createdAt" + ] } }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schema/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schema/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target.", + "type": "string", + "format": "uri" + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.transaction:read", "commerce.transaction:write"] + "scopes": [ + "commerce.transaction:read", + "commerce.transaction:write" + ] }, { "operationId": "addTransactionSignatureByTransactionId", @@ -193,7 +30807,14 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Uuid.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true } }, { @@ -201,7 +30822,16 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Id.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom ID format that can take URN or an UUID", + "type": "string", + "example": "urn:trn:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", + "x-custom-type": true, + "x-custom-id": true } }, { @@ -218,18 +30848,178 @@ "required": false, "contentType": "multipart/form-data", "schema": { - "$ref": "./models/transaction/Signature.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/signature.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Customer Signature", + "type": "object", + "description": "Representation of Customer signature received during transaction", + "properties": { + "signature": { + "type": "string", + "format": "binary", + "writeOnly": true, + "description": "Signature data in Binary format" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "signatureUrl": { + "type": "string", + "format": "uri", + "readOnly": true, + "description": "URL of the image uploaded" + }, + "id": { + "$id": "https://godaddy.com/schemas/commerce/transaction/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + } } }, "responses": { "200": { - "description": "See #/components/responses/200" + "description": "Request was successful" }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schema/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schema/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target.", + "type": "string", + "format": "uri" + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.transaction:write"] + "scopes": [ + "commerce.transaction:write" + ] }, { "operationId": "getTransactionSignaturesById", @@ -243,7 +31033,14 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Uuid.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true } }, { @@ -251,7 +31048,16 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Id.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom ID format that can take URN or an UUID", + "type": "string", + "example": "urn:trn:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", + "x-custom-type": true, + "x-custom-id": true } }, { @@ -296,14 +31102,228 @@ "description": "Transaction Signature list", "schema": { "title": "Transaction Signatures", - "$ref": "#/components/schemas/signatureList" + "allOf": [ + { + "properties": { + "totalItems": { + "type": "integer" + }, + "totalPages": { + "type": "integer" + }, + "links": { + "$id": "https://godaddy.com/schemas/commerce/link.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Links", + "description": "HATEOAS links", + "type": "array", + "x-auto-generated": true, + "definitions": { + "Link": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + }, + "items": { + "description": "HATEOAS link", + "type": "object", + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + } + } + } + } + } + } + ], + "properties": { + "items": { + "items": { + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction/signature.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Customer Signature", + "type": "object", + "description": "Representation of Customer signature received during transaction", + "properties": { + "signature": { + "type": "string", + "format": "binary", + "writeOnly": true, + "description": "Signature data in Binary format" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Created time in RFC 3339 format", + "example": "2022-07-21T17:32:28Z" + }, + "signatureUrl": { + "type": "string", + "format": "uri", + "readOnly": true, + "description": "URL of the image uploaded" + }, + "id": { + "$id": "https://godaddy.com/schemas/commerce/transaction/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true + } + } + }, + "type": "array" + } + } } }, "default": { - "description": "See #/components/responses/error" + "description": "Error", + "schema": { + "$id": "https://godaddy.com/schema/common/error.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "title": "Error", + "description": "The error information.", + "properties": { + "name": { + "type": "string", + "description": "The human-readable, unique name of the error." + }, + "correlationId": { + "type": "string", + "description": "Internal identifier used for correlation purposes." + }, + "message": { + "type": "string", + "description": "The message that describes the error." + }, + "informationLink": { + "type": "string", + "description": "The URI for detailed information related to this error for the developer." + }, + "details": { + "type": "array", + "description": "An array of additional details about the error. Required for client-side `4XX` errors.", + "additionalItems": false, + "items": { + "$id": "https://godaddy.com/schema/common/error-details.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Error Details", + "type": "object", + "description": "The error details. Required for client-side `4XX` errors.", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If the field is in the body, set this value to the JSON pointer to that field. Required for client-side errors." + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error." + }, + "location": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`.", + "default": "body" + }, + "issue": { + "type": "string", + "description": "The unique fine-grained application-level error code." + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description MAY change over the lifetime of an API, so clients MUST NOT depend on this value." + } + }, + "required": [ + "issue" + ] + } + }, + "links": { + "type": "array", + "description": "An array of error-related HATEOAS links.", + "readOnly": true, + "items": { + "readOnly": true, + "$id": "https://godaddy.com/schema/common/link-description.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Link Description", + "type": "object", + "description": "A request-related [HATEOAS link](https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02).", + "properties": { + "href": { + "description": "The complete target URL, or link, to use in combination with the method to make the related call, as defined by [RFC 6570 - URI Template](https://tools.ietf.org/html/rfc6570), with the addition of the `$`, `(`, and `)` characters for pre-processing. The `href` is the key HATEOAS component that links a completed call with a subsequent call.", + "type": "string", + "format": "uri" + }, + "rel": { + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which is an identifier for a link that unambiguously describes the semantics of the link. For values, see [Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml).", + "type": "string" + }, + "title": { + "description": "The link title.", + "type": "string" + }, + "targetMediaType": { + "description": "The [RFC 2046-defined media type](https://www.ietf.org/rfc/rfc2046.txt) that describes the link target.", + "type": "string" + }, + "targetSchema": { + "description": "The schema that describes the link target.", + "type": "string", + "format": "uri" + }, + "method": { + "description": "The method to use to request the link target. For example, for HTTP, this might be `GET` or `DELETE`.", + "type": "string" + }, + "submissionMediaType": { + "description": "The media type with which to submit data with the request.", + "type": "string", + "default": "application/json" + }, + "submissionSchema": { + "description": "The schema that describes the request data.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "rel", + "href" + ] + } + } + }, + "required": [ + "name", + "correlationId", + "message" + ] + } } }, - "scopes": ["commerce.transaction:read", "commerce.transaction:write"] + "scopes": [ + "commerce.transaction:read", + "commerce.transaction:write" + ] }, { "operationId": "getTransactionReference", @@ -317,7 +31337,14 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Uuid.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true } }, { @@ -325,7 +31352,16 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Id.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom ID format that can take URN or an UUID", + "type": "string", + "example": "urn:trn:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", + "x-custom-type": true, + "x-custom-id": true } }, { @@ -342,11 +31378,37 @@ "200": { "description": "Transaction references by value", "schema": { - "$ref": "./models/TransactionReference.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction-reference.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Reference", + "type": "object", + "description": "Reference to a document (e.g. order or invoice) that this transaction is for", + "properties": { + "value": { + "type": "string", + "maxLength": 128 + }, + "type": { + "type": "string", + "maxLength": 32 + }, + "additionalLabel": { + "description": "(Optional) Label that the reference points to", + "type": "string", + "maxLength": 32 + } + }, + "required": [ + "value", + "type" + ] } } }, - "scopes": ["commerce.transaction:read", "commerce.transaction:write"] + "scopes": [ + "commerce.transaction:read", + "commerce.transaction:write" + ] }, { "operationId": "createTransactionReference", @@ -360,7 +31422,14 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Uuid.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true } }, { @@ -368,7 +31437,16 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Id.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom ID format that can take URN or an UUID", + "type": "string", + "example": "urn:trn:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", + "x-custom-type": true, + "x-custom-id": true } }, { @@ -385,7 +31463,30 @@ "required": false, "contentType": "application/json", "schema": { - "$ref": "./models/TransactionReference.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/transaction-reference.v2", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Transaction Reference", + "type": "object", + "description": "Reference to a document (e.g. order or invoice) that this transaction is for", + "properties": { + "value": { + "type": "string", + "maxLength": 128 + }, + "type": { + "type": "string", + "maxLength": 32 + }, + "additionalLabel": { + "description": "(Optional) Label that the reference points to", + "type": "string", + "maxLength": 32 + } + }, + "required": [ + "value", + "type" + ] } }, "responses": { @@ -393,7 +31494,9 @@ "description": "Resource created / updated successfully" } }, - "scopes": ["commerce.transaction:write"] + "scopes": [ + "commerce.transaction:write" + ] }, { "operationId": "deleteTransactionReference", @@ -407,7 +31510,14 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Uuid.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/uuid.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Uuid", + "description": "unique identifier (UUID format)", + "type": "string", + "format": "uuid", + "example": "id", + "readOnly": true } }, { @@ -415,7 +31525,16 @@ "in": "path", "required": true, "schema": { - "$ref": "./types/Id.yaml" + "$id": "https://godaddy.com/schemas/commerce/transaction/id.v1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Id", + "description": "Custom ID format that can take URN or an UUID", + "type": "string", + "example": "urn:trn:oak:410dee2e-abbf-3f59-b640-fc3aca175344", + "readOnly": true, + "pattern": "([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(urn:[a-z]{1,3}:[a-z]{1,3}:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", + "x-custom-type": true, + "x-custom-id": true } }, { @@ -430,13 +31549,15 @@ ], "responses": { "200": { - "description": "See #/components/responses/200" + "description": "Request was successful" }, "404": { "description": "Reference Not Found" } }, - "scopes": ["commerce.transaction:write"] + "scopes": [ + "commerce.transaction:write" + ] } ] -} +} \ No newline at end of file diff --git a/src/services/public-url.ts b/src/services/public-url.ts index e1f8bf7..3b4abcc 100644 --- a/src/services/public-url.ts +++ b/src/services/public-url.ts @@ -17,101 +17,101 @@ import { type } from "arktype"; * rather than an opaque 403 from the upstream WAF. */ export function isPublicRoutableUrl(value: string): boolean { - if (typeof value !== "string" || value.trim() === "") { - return false; - } - - let parsed: URL; - try { - parsed = new URL(value); - } catch { - return false; - } - - if (parsed.protocol !== "http:" && parsed.protocol !== "https:") { - return false; - } - - const rawHost = parsed.hostname.toLowerCase(); - - if (rawHost === "") { - return false; - } - - // WHATWG URL returns IPv6 hostnames wrapped in square brackets. - const host = - rawHost.startsWith("[") && rawHost.endsWith("]") - ? rawHost.slice(1, -1) - : rawHost; - - if (host === "localhost") { - return false; - } - - if (host.endsWith(".localhost") || host.endsWith(".local")) { - return false; - } - - if (isIPv4(host)) { - return isPublicIPv4(host); - } - - if (isIPv6(host)) { - return isPublicIPv6(host); - } - - return true; + if (typeof value !== "string" || value.trim() === "") { + return false; + } + + let parsed: URL; + try { + parsed = new URL(value); + } catch { + return false; + } + + if (parsed.protocol !== "http:" && parsed.protocol !== "https:") { + return false; + } + + const rawHost = parsed.hostname.toLowerCase(); + + if (rawHost === "") { + return false; + } + + // WHATWG URL returns IPv6 hostnames wrapped in square brackets. + const host = + rawHost.startsWith("[") && rawHost.endsWith("]") + ? rawHost.slice(1, -1) + : rawHost; + + if (host === "localhost") { + return false; + } + + if (host.endsWith(".localhost") || host.endsWith(".local")) { + return false; + } + + if (isIPv4(host)) { + return isPublicIPv4(host); + } + + if (isIPv6(host)) { + return isPublicIPv6(host); + } + + return true; } function isIPv4(host: string): boolean { - return /^(\d{1,3}\.){3}\d{1,3}$/.test(host); + return /^(\d{1,3}\.){3}\d{1,3}$/.test(host); } function parseIPv4Octets(host: string): number[] | null { - const parts = host.split(".").map((p) => Number(p)); - if (parts.length !== 4) return null; - for (const p of parts) { - if (!Number.isInteger(p) || p < 0 || p > 255) return null; - } - return parts; + const parts = host.split(".").map((p) => Number(p)); + if (parts.length !== 4) return null; + for (const p of parts) { + if (!Number.isInteger(p) || p < 0 || p > 255) return null; + } + return parts; } function isPublicIPv4(host: string): boolean { - const octets = parseIPv4Octets(host); - if (!octets) return false; - const [a, b] = octets as [number, number, number, number]; - - // Unspecified 0.0.0.0/8 - if (a === 0) return false; - // Loopback 127.0.0.0/8 - if (a === 127) return false; - // RFC1918: 10.0.0.0/8 - if (a === 10) return false; - // RFC1918: 172.16.0.0/12 - if (a === 172 && b >= 16 && b <= 31) return false; - // RFC1918: 192.168.0.0/16 - if (a === 192 && b === 168) return false; - // Link-local 169.254.0.0/16 - if (a === 169 && b === 254) return false; - - return true; + const octets = parseIPv4Octets(host); + if (!octets) return false; + const [a, b] = octets as [number, number, number, number]; + + // Unspecified 0.0.0.0/8 + if (a === 0) return false; + // Loopback 127.0.0.0/8 + if (a === 127) return false; + // RFC1918: 10.0.0.0/8 + if (a === 10) return false; + // RFC1918: 172.16.0.0/12 + if (a === 172 && b >= 16 && b <= 31) return false; + // RFC1918: 192.168.0.0/16 + if (a === 192 && b === 168) return false; + // Link-local 169.254.0.0/16 + if (a === 169 && b === 254) return false; + + return true; } function isIPv6(host: string): boolean { - // WHATWG URL parses IPv6 hostnames wrapped in [] and returns them - // unwrapped in .hostname, so detect by the presence of a ":". - return host.includes(":"); + // WHATWG URL parses IPv6 hostnames wrapped in [] and returns them + // unwrapped in .hostname, so detect by the presence of a ":". + return host.includes(":"); } function isPublicIPv6(host: string): boolean { - const normalized = host.toLowerCase(); + const normalized = host.toLowerCase(); - if (normalized === "::" || normalized === "::1") return false; - if (normalized.startsWith("fe80:") || normalized.startsWith("fe80::")) { - return false; - } + if (normalized === "::" || normalized === "::1") return false; + if (normalized.startsWith("fe80:") || normalized.startsWith("fe80::")) { + return false; + } - return true; + return true; } /** @@ -122,10 +122,10 @@ function isPublicIPv6(host: string): boolean { * internet (for example: app homepage URLs and OAuth redirect URIs). */ export const publicHttpUrl = type("string").narrow((value, ctx) => { - if (isPublicRoutableUrl(value)) { - return true; - } - return ctx.mustBe( - "a publicly-resolvable http(s) URL (localhost, loopback, and private IPs are not allowed)", - ); + if (isPublicRoutableUrl(value)) { + return true; + } + return ctx.mustBe( + "a publicly-resolvable http(s) URL (localhost, loopback, and private IPs are not allowed)", + ); }); diff --git a/tests/unit/services/public-url.test.ts b/tests/unit/services/public-url.test.ts index fd672ec..b3d730a 100644 --- a/tests/unit/services/public-url.test.ts +++ b/tests/unit/services/public-url.test.ts @@ -1,121 +1,121 @@ import { type } from "arktype"; import { describe, expect, test } from "vitest"; import { - isPublicRoutableUrl, - publicHttpUrl, + isPublicRoutableUrl, + publicHttpUrl, } from "../../../src/services/public-url"; describe("isPublicRoutableUrl", () => { - describe("accepts publicly-resolvable http(s) URLs", () => { - test.each([ - "https://example.com", - "https://app.example.com", - "http://example.com", - "https://api.example.com:8443", - "https://example.com/path?query=1", - "https://sub.domain.example.co.uk", - "https://xn--bcher-kva.example.com", - "https://[2606:4700:4700::1111]", - ])("accepts %s", (url) => { - expect(isPublicRoutableUrl(url)).toBe(true); - }); - }); + describe("accepts publicly-resolvable http(s) URLs", () => { + test.each([ + "https://example.com", + "https://app.example.com", + "http://example.com", + "https://api.example.com:8443", + "https://example.com/path?query=1", + "https://sub.domain.example.co.uk", + "https://xn--bcher-kva.example.com", + "https://[2606:4700:4700::1111]", + ])("accepts %s", (url) => { + expect(isPublicRoutableUrl(url)).toBe(true); + }); + }); - describe("rejects localhost variants", () => { - test.each([ - "http://localhost", - "http://localhost:3000", - "http://localhost:3000/callback", - "https://localhost:5678", - "http://LOCALHOST", - "http://foo.localhost", - "http://foo.local", - "http://foo.bar.local", - ])("rejects %s", (url) => { - expect(isPublicRoutableUrl(url)).toBe(false); - }); - }); + describe("rejects localhost variants", () => { + test.each([ + "http://localhost", + "http://localhost:3000", + "http://localhost:3000/callback", + "https://localhost:5678", + "http://LOCALHOST", + "http://foo.localhost", + "http://foo.local", + "http://foo.bar.local", + ])("rejects %s", (url) => { + expect(isPublicRoutableUrl(url)).toBe(false); + }); + }); - describe("rejects loopback and unspecified addresses", () => { - test.each([ - "http://127.0.0.1", - "http://127.0.0.1:8080", - "http://127.1.2.3", - "http://0.0.0.0", - "http://0.0.0.0:8080", - "http://[::1]", - "http://[::1]:8080", - "http://[::]", - ])("rejects %s", (url) => { - expect(isPublicRoutableUrl(url)).toBe(false); - }); - }); + describe("rejects loopback and unspecified addresses", () => { + test.each([ + "http://127.0.0.1", + "http://127.0.0.1:8080", + "http://127.1.2.3", + "http://0.0.0.0", + "http://0.0.0.0:8080", + "http://[::1]", + "http://[::1]:8080", + "http://[::]", + ])("rejects %s", (url) => { + expect(isPublicRoutableUrl(url)).toBe(false); + }); + }); - describe("rejects RFC1918 private IPv4 ranges", () => { - test.each([ - "http://10.0.0.1", - "http://10.255.255.255", - "http://172.16.0.1", - "http://172.20.1.2", - "http://172.31.255.255", - "http://192.168.0.1", - "http://192.168.1.100", - ])("rejects %s", (url) => { - expect(isPublicRoutableUrl(url)).toBe(false); - }); - }); + describe("rejects RFC1918 private IPv4 ranges", () => { + test.each([ + "http://10.0.0.1", + "http://10.255.255.255", + "http://172.16.0.1", + "http://172.20.1.2", + "http://172.31.255.255", + "http://192.168.0.1", + "http://192.168.1.100", + ])("rejects %s", (url) => { + expect(isPublicRoutableUrl(url)).toBe(false); + }); + }); - describe("rejects link-local ranges", () => { - test.each([ - "http://169.254.0.1", - "http://169.254.169.254", - "http://[fe80::1]", - "http://[FE80::abcd]", - ])("rejects %s", (url) => { - expect(isPublicRoutableUrl(url)).toBe(false); - }); - }); + describe("rejects link-local ranges", () => { + test.each([ + "http://169.254.0.1", + "http://169.254.169.254", + "http://[fe80::1]", + "http://[FE80::abcd]", + ])("rejects %s", (url) => { + expect(isPublicRoutableUrl(url)).toBe(false); + }); + }); - describe("rejects non-http(s) schemes and malformed input", () => { - test.each([ - "ftp://example.com", - "file:///etc/passwd", - "javascript:alert(1)", - "not-a-url", - "", - " ", - ])("rejects %s", (url) => { - expect(isPublicRoutableUrl(url)).toBe(false); - }); - }); + describe("rejects non-http(s) schemes and malformed input", () => { + test.each([ + "ftp://example.com", + "file:///etc/passwd", + "javascript:alert(1)", + "not-a-url", + "", + " ", + ])("rejects %s", (url) => { + expect(isPublicRoutableUrl(url)).toBe(false); + }); + }); - test("does not treat non-RFC1918 /8 ranges like 172.15 or 172.32 as private", () => { - expect(isPublicRoutableUrl("http://172.15.0.1")).toBe(true); - expect(isPublicRoutableUrl("http://172.32.0.1")).toBe(true); - }); + test("does not treat non-RFC1918 /8 ranges like 172.15 or 172.32 as private", () => { + expect(isPublicRoutableUrl("http://172.15.0.1")).toBe(true); + expect(isPublicRoutableUrl("http://172.32.0.1")).toBe(true); + }); }); describe("publicHttpUrl (arktype narrowing)", () => { - test("parses a valid public URL", () => { - const result = publicHttpUrl("https://app.example.com"); - expect(result).toBe("https://app.example.com"); - }); + test("parses a valid public URL", () => { + const result = publicHttpUrl("https://app.example.com"); + expect(result).toBe("https://app.example.com"); + }); - test("produces an ArkError for localhost", () => { - const result = publicHttpUrl("http://localhost:3000/callback"); - expect(result).toBeInstanceOf(type.errors); - if (result instanceof type.errors) { - expect(result.summary).toMatch(/publicly-resolvable/i); - } - }); + test("produces an ArkError for localhost", () => { + const result = publicHttpUrl("http://localhost:3000/callback"); + expect(result).toBeInstanceOf(type.errors); + if (result instanceof type.errors) { + expect(result.summary).toMatch(/publicly-resolvable/i); + } + }); - test("produces an ArkError for loopback IP", () => { - const result = publicHttpUrl("http://127.0.0.1:8080"); - expect(result).toBeInstanceOf(type.errors); - }); + test("produces an ArkError for loopback IP", () => { + const result = publicHttpUrl("http://127.0.0.1:8080"); + expect(result).toBeInstanceOf(type.errors); + }); - test("produces an ArkError for non-http(s) scheme", () => { - const result = publicHttpUrl("ftp://example.com"); - expect(result).toBeInstanceOf(type.errors); - }); + test("produces an ArkError for non-http(s) scheme", () => { + const result = publicHttpUrl("ftp://example.com"); + expect(result).toBeInstanceOf(type.errors); + }); });